Revision eea4fa05 libavcodec/intelh263dec.c

View differences:

libavcodec/intelh263dec.c
67 67
    if (format < 6) {
68 68
        s->width = h263_format[format][0];
69 69
        s->height = h263_format[format][1];
70
        s->avctx->sample_aspect_ratio.num=12;s->avctx->sample_aspect_ratio.den=11;
70 71
    }
71 72
    else {
72 73
        format = get_bits(&s->gb, 3);
......
92 93
        skip_bits1(&s->gb);
93 94
        skip_bits(&s->gb, 9); // display height
94 95
        if(ar == 15){
95
            skip_bits(&s->gb, 8); // aspect ratio - width
96
            skip_bits(&s->gb, 8); // aspect ratio - height
96
            s->avctx->sample_aspect_ratio.num = get_bits(&s->gb, 8); // aspect ratio - width
97
            s->avctx->sample_aspect_ratio.den = get_bits(&s->gb, 8); // aspect ratio - height
97 98
        }
99
        else {
100
            s->avctx->sample_aspect_ratio = ff_h263_pixel_aspect[ar];
101
        }
102
        if(s->avctx->sample_aspect_ratio.num == 0)
103
            av_log(s->avctx, AV_LOG_ERROR, "Invalid aspect ratio\n");
98 104
    }
99 105

  
100 106
    s->chroma_qscale= s->qscale = get_bits(&s->gb, 5);

Also available in: Unified diff