changeset 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 2768ffe4332b
children 77b99eddf88a
files utils.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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;
         }