Revision 5d91e928

View differences:

libavdevice/v4l.c
84 84
    }
85 85
    s->time_base = ap->time_base;
86 86

  
87
    if((unsigned)ap->width > 32767 || (unsigned)ap->height > 32767) {
88
        av_log(s1, AV_LOG_ERROR, "Capture size is out of range: %dx%d\n",
89
            ap->width, ap->height);
90
        return -1;
91
    }
92 87
    s->video_win.width = ap->width;
93 88
    s->video_win.height = ap->height;
94 89

  
......
121 116
        }
122 117
    }
123 118

  
119
    if(avcodec_check_dimensions(s1, s->video_win.width, s->video_win.height) < 0)
120
        return -1;
121

  
124 122
    desired_palette = -1;
125 123
    desired_depth = -1;
126 124
    for (j = 0; j < vformat_num; j++) {
libavdevice/v4l2.c
526 526
    frame_rate = ap->time_base.den;
527 527
    frame_rate_base = ap->time_base.num;
528 528

  
529
    if((unsigned)width > 32767 || (unsigned)height > 32767) {
530
        av_log(s1, AV_LOG_ERROR, "Wrong size (%dx%d)\n", width, height);
531

  
529
    if(avcodec_check_dimensions(s1, ap->width, ap->height) < 0)
532 530
        return -1;
533
    }
534 531

  
535 532
    st = av_new_stream(s1, 0);
536 533
    if (!st) {

Also available in: Unified diff