summaryrefslogtreecommitdiff
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r--libavdevice/v4l2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index ce88903c3a..c00785f51e 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -43,6 +43,7 @@
#endif
#include <time.h>
#include <strings.h>
+#include "libavcore/imgutils.h"
static const int desired_video_buffers = 256;
@@ -623,7 +624,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
return AVERROR(EIO);
}
- if (avcodec_check_dimensions(s1, s->width, s->height) < 0)
+ if (av_check_image_size(s->width, s->height, 0, s1) < 0)
return AVERROR(EINVAL);
s->frame_format = desired_format;