diff utils.c @ 3929:e0eb33b98f43 libavformat

Ensure that muxer and encoder aspect ratios match. So no invalid files are generated.
author michael
date Fri, 19 Sep 2008 12:37:38 +0000
parents 45dfe99dced8
children a324a7aa8a5b
line wrap: on
line diff
--- a/utils.c	Thu Sep 18 05:25:29 2008 +0000
+++ b/utils.c	Fri Sep 19 12:37:38 2008 +0000
@@ -2457,6 +2457,10 @@
                 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;
         }