Mercurial > libavcodec.hg
changeset 7787:681a05d9b04f libavcodec
Ignore the spec, and calculate aspect ratio on width/height.
Fixes issue562 and issue621.
author | michael |
---|---|
date | Wed, 03 Sep 2008 19:04:46 +0000 |
parents | 0251b288a4a0 |
children | ffd4b1364b62 |
files | mpeg12.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpeg12.c Wed Sep 03 17:43:00 2008 +0000 +++ b/mpeg12.c Wed Sep 03 19:04:46 2008 +0000 @@ -1267,7 +1267,9 @@ 1<<30); //MPEG-2 aspect if(s->aspect_ratio_info > 1){ - if( (s1->pan_scan.width == 0 )||(s1->pan_scan.height == 0) ){ + //we ignore the spec here as reality does not match the spec, see for example + // res_change_ffmpeg_aspect.ts and sequence-display-aspect.mpg + if( (s1->pan_scan.width == 0 )||(s1->pan_scan.height == 0) || 1){ s->avctx->sample_aspect_ratio= av_div_q( ff_mpeg2_aspect[s->aspect_ratio_info],