1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

Ignore the spec, and calculate aspect ratio on width/height.

Fixes issue562 and issue621.

Originally committed as revision 15183 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-09-03 19:04:46 +00:00
parent 1c9ff17920
commit 395206f6b1

View File

@ -1267,7 +1267,9 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){
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],