Revision edbd72ac

View differences:

libavcodec/mpeg12.c
1275 1275
            av_reduce(
1276 1276
                &s->avctx->time_base.den,
1277 1277
                &s->avctx->time_base.num,
1278
                ff_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num,
1278
                ff_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num*2,
1279 1279
                ff_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
1280 1280
                1<<30);
1281 1281
        //MPEG-2 aspect
libavcodec/mpegvideo_parser.c
81 81
                        pc->height |=( vert_size_ext << 12);
82 82
                        avctx->bit_rate += (bit_rate_ext << 18) * 400;
83 83
                        avcodec_set_dimensions(avctx, pc->width, pc->height);
84
                        avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1);
84
                        avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2;
85 85
                        avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1);
86 86
                        avctx->codec_id = CODEC_ID_MPEG2VIDEO;
87 87
                        avctx->sub_id = 2; /* forces MPEG2 */
......
95 95
                        progressive_frame = buf[4] & (1 << 7);
96 96

  
97 97
                        /* check if we must repeat the frame */
98
                        s->repeat_pict = 1;
98 99
                        if (repeat_first_field) {
99 100
                            if (pc->progressive_sequence) {
100 101
                                if (top_field_first)
101
                                    s->repeat_pict = 4;
102
                                    s->repeat_pict = 5;
102 103
                                else
103
                                    s->repeat_pict = 2;
104
                                    s->repeat_pict = 3;
104 105
                            } else if (progressive_frame) {
105
                                s->repeat_pict = 1;
106
                                s->repeat_pict = 2;
106 107
                            }
107 108
                        }
108 109
                    }

Also available in: Unified diff