aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-28 14:41:19 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-28 14:41:19 +0000
commit5d91e9285339acaea7daf9e76932d5237cc771df (patch)
treec962860761513a47ef81ef4b047cc197099ebd4d /libavdevice/v4l2.c
parentade8fb4d758977345df6d7e1c55a6cdc0394e019 (diff)
downloadffmpeg-5d91e9285339acaea7daf9e76932d5237cc771df.tar.gz
Use avcodec_check_dimensions() for checking the frame size validity.
The v4l.c check is moved after the eventual automatic size detection, so the check in that case is performed on the new set values. Originally committed as revision 16370 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r--libavdevice/v4l2.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 6819d9cc9f..d4eb7c874a 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -526,11 +526,8 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
frame_rate = ap->time_base.den;
frame_rate_base = ap->time_base.num;
- if((unsigned)width > 32767 || (unsigned)height > 32767) {
- av_log(s1, AV_LOG_ERROR, "Wrong size (%dx%d)\n", width, height);
-
+ if(avcodec_check_dimensions(s1, ap->width, ap->height) < 0)
return -1;
- }
st = av_new_stream(s1, 0);
if (!st) {