changeset 4264:bf7a9658de71 libavformat

change sample aspect ratio test to be more clear, print old one
author bcoudurier
date Tue, 20 Jan 2009 21:06:57 +0000
parents 06e2069d3b10
children 0855c4630a8f
files mov.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Tue Jan 20 16:19:13 2009 +0000
+++ b/mov.c	Tue Jan 20 21:06:57 2009 +0000
@@ -439,10 +439,11 @@
     const int den = get_be32(pb);
     AVStream * const st = c->fc->streams[c->fc->nb_streams-1];
     if (den != 0) {
-        if ((st->sample_aspect_ratio.den && den != st->sample_aspect_ratio.den) ||
-            (st->sample_aspect_ratio.num && num != st->sample_aspect_ratio.num))
+        if ((st->sample_aspect_ratio.den != 1 || st->sample_aspect_ratio.num) && // default
+            (den != st->sample_aspect_ratio.den || num != st->sample_aspect_ratio.num))
             av_log(c->fc, AV_LOG_WARNING,
-                   "sample aspect ratio already set, overriding by 'pasp' atom\n");
+                   "sample aspect ratio already set to %d:%d, overriding by 'pasp' atom\n",
+                   st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
         st->sample_aspect_ratio.num = num;
         st->sample_aspect_ratio.den = den;
     }