X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavdevice%2Fv4l2.c;h=4829b1b694902235b4c06308a4e0dda7aa0dc52c;hb=9db747b2a300380dd65032818155067054332dae;hp=0369d7144b7750cb6b525df3e0ce9c1f02769ef0;hpb=1c600888857544986d6576bc164e0dc8f0f4b6c7;p=ffmpeg diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 0369d7144b7..4829b1b6949 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -46,6 +46,7 @@ #endif #include #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;