if (frame_rate_ext_d >= 1) s->frame_rate = (s->frame_rate * frame_rate_ext_n) / frame_rate_ext_d;
av_reduce( &s->avctx->frame_rate, &s->avctx->frame_rate_base, frame_rate_tab[s->frame_rate_index] * (frame_rate_ext_n+1), MPEG1_FRAME_RATE_BASE * (frame_rate_ext_d+1), 1<<30);
static void mpeg_decode_sequence_extension(MpegEncContext *s){    int horiz_size_ext, vert_size_ext;    int bit_rate_ext, vbv_buf_ext;    int frame_rate_ext_n, frame_rate_ext_d;    float aspect;    skip_bits(&s->gb, 8); /* profil and level */    s->progressive_sequence = get_bits1(&s->gb); /* progressive_sequence */    skip_bits(&s->gb, 2); /* chroma_format */    horiz_size_ext = get_bits(&s->gb, 2);    vert_size_ext = get_bits(&s->gb, 2);    s->width |= (horiz_size_ext << 12);    s->height |= (vert_size_ext << 12);    bit_rate_ext = get_bits(&s->gb, 12);  /* XXX: handle it */    s->bit_rate = ((s->bit_rate / 400) | (bit_rate_ext << 12)) * 400;    skip_bits1(&s->gb); /* marker */    vbv_buf_ext = get_bits(&s->gb, 8);    s->low_delay = get_bits1(&s->gb);    frame_rate_ext_n = get_bits(&s->gb, 2);    frame_rate_ext_d = get_bits(&s->gb, 5);    if (frame_rate_ext_d >= 1)        s->frame_rate = (s->frame_rate * frame_rate_ext_n) / frame_rate_ext_d;    dprintf("sequence extension\n");    s->mpeg2 = 1;    s->avctx->sub_id = 2; /* indicates mpeg2 found */    aspect= mpeg2_aspect[s->aspect_ratio_info];    if(aspect>0.0)      s->avctx->aspect_ratio= s->width/(aspect*s->height);    else if(aspect<0.0) s->avctx->aspect_ratio= -1.0/aspect;}