Originally committed as revision 22986 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -616,9 +616,6 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 615 unmodified lines | ||
| 616 | 616 | } |
| 617 | 617 | |
| 618 | 618 | desired_format = device_try_init(s1, ap, &s->width, &s->height, &codec_id); |
| 619 | − if (avcodec_check_dimensions(s1, s->width, s->height) < 0) | |
| 620 | − return AVERROR(EINVAL); | |
| 621 | − | |
| 622 | 619 | if (desired_format == 0) { |
| 623 | 620 | av_log(s1, AV_LOG_ERROR, "Cannot find a proper format for " |
| 624 | 621 | "codec_id %d, pix_fmt %d.\n", s1->video_codec_id, ap->pix_fmt); |
| @@ -626,6 +623,8 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 1 unmodified line | ||
| 626 | 623 | |
| 627 | 624 | return AVERROR(EIO); |
| 628 | 625 | } |
| 626 | + if (avcodec_check_dimensions(s1, s->width, s->height) < 0) | |
| 627 | + return AVERROR(EINVAL); | |
| 629 | 628 | s->frame_format = desired_format; |
| 630 | 629 | |
| 631 | 630 | if( v4l2_set_parameters( s1, ap ) < 0 ) |