Ensure that muxer and encoder aspect ratios match. So no

invalid files are generated.

Originally committed as revision 15367 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-09-19 12:37:38 +00:00
parent 8a4f816a6d
commit 0354ddb71c

View File

@ -2457,6 +2457,10 @@ int av_write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "dimensions not set\n");
return -1;
}
if(av_cmp_q(st->sample_aspect_ratio, st->codec->sample_aspect_ratio)){
av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder and muxer layer\n");
return -1;
}
break;
}