summaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-08 17:05:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-08 17:59:56 +0200
commita6a085a9281314781c878e96da42139f8fe56848 (patch)
tree51467f48006ef43f7163fd8bbd90d11f1b6c951b /libavdevice
parent3f345290dc01666a224c08b6bfcd8e8cf476a5cf (diff)
downloadffmpeg-streaming-a6a085a9281314781c878e96da42139f8fe56848.zip
ffmpeg-streaming-a6a085a9281314781c878e96da42139f8fe56848.tar.gz
v4l2: use av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/v4l2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 0369d71..4829b1b 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -46,6 +46,7 @@
#endif
#include <linux/videodev2.h>
#endif
+#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
@@ -560,7 +561,7 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
return AVERROR(errno);
}
- assert(buf.index < s->buffers);
+ av_assert0(buf.index < s->buffers);
if (s->frame_size > 0 && buf.bytesused != s->frame_size) {
av_log(ctx, AV_LOG_ERROR,
"The v4l2 frame is %d bytes, but %d bytes are expected\n",
@@ -767,7 +768,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
if (desired_format != 0) {
*codec_id = fmt_v4l2codec(desired_format);
- assert(*codec_id != CODEC_ID_NONE);
+ av_assert0(*codec_id != CODEC_ID_NONE);
}
return desired_format;
OpenPOWER on IntegriCloud