Revision f50270c9

View differences:

libavcodec/mpegvideo_parser.c
53 53
                pc->width  = (buf[0] << 4) | (buf[1] >> 4);
54 54
                pc->height = ((buf[1] & 0x0f) << 8) | buf[2];
55 55
                if(!avctx->width || !avctx->height || !avctx->coded_width || !avctx->coded_height){
56
                avcodec_set_dimensions(avctx, pc->width, pc->height);
56
                    avcodec_set_dimensions(avctx, pc->width, pc->height);
57 57
                    did_set_size=1;
58 58
                }
59 59
                frame_rate_index = buf[3] & 0xf;
......
82 82
                        pc->height |=( vert_size_ext << 12);
83 83
                        avctx->bit_rate += (bit_rate_ext << 18) * 400;
84 84
                        if(did_set_size)
85
                        avcodec_set_dimensions(avctx, pc->width, pc->height);
85
                            avcodec_set_dimensions(avctx, pc->width, pc->height);
86 86
                        avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2;
87 87
                        avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1);
88 88
                        avctx->codec_id = CODEC_ID_MPEG2VIDEO;

Also available in: Unified diff