~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libavcodec/mpegvideo_parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
                    }