Revision f259747b

View differences:

libavcodec/mpeg12.c
223 223
            for(i=1; i<15; i++){
224 224
                float error= aspect_ratio;
225 225
                if(s->codec_id == CODEC_ID_MPEG1VIDEO || i <=1)
226
                    error-= mpeg1_aspect[i];
226
                    error-= 1.0/mpeg1_aspect[i];
227 227
                else
228 228
                    error-= av_q2d(mpeg2_aspect[i])*s->height/s->width;
229 229
             
......
2278 2278
    height = get_bits(&s->gb, 12);
2279 2279
    s->aspect_ratio_info= get_bits(&s->gb, 4);
2280 2280
    if(s->codec_id == CODEC_ID_MPEG1VIDEO){
2281
        aspect= mpeg1_aspect[s->aspect_ratio_info];
2281
        aspect= 1.0/mpeg1_aspect[s->aspect_ratio_info];
2282 2282
        if(aspect!=0.0) avctx->sample_aspect_ratio= av_d2q(aspect, 255);
2283 2283
    }
2284 2284

  

Also available in: Unified diff