Revision 761089b0 libavcodec/mpeg12.c

View differences:

libavcodec/mpeg12.c
200 200
    int64_t d;
201 201

  
202 202
    for(i=1;i<14;i++) {
203
        int64_t n0= 1001LL/frame_rate_tab[i].den*frame_rate_tab[i].num*s->avctx->time_base.num;
203
        int64_t n0= 1001LL/ff_frame_rate_tab[i].den*ff_frame_rate_tab[i].num*s->avctx->time_base.num;
204 204
        int64_t n1= 1001LL*s->avctx->time_base.den;
205 205
        if(s->avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL && i>=9) break;
206 206

  
......
262 262
        if(aspect_ratio==0.0) aspect_ratio= 1.0; //pixel aspect 1:1 (VGA)
263 263

  
264 264
        if (s->current_picture.key_frame) {
265
            AVRational framerate= frame_rate_tab[s->frame_rate_index];
265
            AVRational framerate= ff_frame_rate_tab[s->frame_rate_index];
266 266

  
267 267
            /* mpeg1 header repeated every gop */
268 268
            put_header(s, SEQ_START_CODE);
......
2121 2121

  
2122 2122
        if(avctx->sub_id==1){//s->codec_id==avctx->codec_id==CODEC_ID
2123 2123
            //mpeg1 fps
2124
            avctx->time_base.den     = frame_rate_tab[s->frame_rate_index].num;
2125
            avctx->time_base.num= frame_rate_tab[s->frame_rate_index].den;
2124
            avctx->time_base.den= ff_frame_rate_tab[s->frame_rate_index].num;
2125
            avctx->time_base.num= ff_frame_rate_tab[s->frame_rate_index].den;
2126 2126
            //mpeg1 aspect
2127 2127
            avctx->sample_aspect_ratio= av_d2q(
2128 2128
                    1.0/mpeg1_aspect[s->aspect_ratio_info], 255);
......
2132 2132
            av_reduce(
2133 2133
                &s->avctx->time_base.den,
2134 2134
                &s->avctx->time_base.num,
2135
                frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num,
2136
                frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
2135
                ff_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num,
2136
                ff_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
2137 2137
                1<<30);
2138 2138
        //mpeg2 aspect
2139 2139
            if(s->aspect_ratio_info > 1){
......
3252 3252
    encode_init,
3253 3253
    MPV_encode_picture,
3254 3254
    MPV_encode_end,
3255
    .supported_framerates= frame_rate_tab+1,
3255
    .supported_framerates= ff_frame_rate_tab+1,
3256 3256
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
3257 3257
    .capabilities= CODEC_CAP_DELAY,
3258 3258
};
......
3265 3265
    encode_init,
3266 3266
    MPV_encode_picture,
3267 3267
    MPV_encode_end,
3268
    .supported_framerates= frame_rate_tab+1,
3268
    .supported_framerates= ff_frame_rate_tab+1,
3269 3269
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, -1},
3270 3270
    .capabilities= CODEC_CAP_DELAY,
3271 3271
};

Also available in: Unified diff