[FFmpeg-cvslog] r15367 - trunk/libavformat/utils.c

michael subversion
Fri Sep 19 14:37:38 CEST 2008


Author: michael
Date: Fri Sep 19 14:37:38 2008
New Revision: 15367

Log:
Ensure that muxer and encoder aspect ratios match. So no
invalid files are generated.


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Fri Sep 19 14:37:38 2008
@@ -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;
         }
 




More information about the ffmpeg-cvslog mailing list