aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-09-19 12:37:38 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-19 12:37:38 +0000
commit0354ddb71c18ea8e9d05d6d2509f9ec786a4488d (patch)
tree1ff689dccee94765b93b1be523f5d32000c49954
parent8a4f816a6dd8a3a6da9b6569377e935efd255614 (diff)
downloadffmpeg-0354ddb71c18ea8e9d05d6d2509f9ec786a4488d.tar.gz
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
-rw-r--r--libavformat/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c124507446..8938c499f5 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;
}