avformat_write_header(): detail error message
authorRafaël Carré <funman@videolan.org>
Sun, 29 Jan 2012 04:29:26 +0000 (23:29 -0500)
committerAnton Khirnov <anton@khirnov.net>
Mon, 30 Jan 2012 06:32:57 +0000 (07:32 +0100)
Give the exact aspect ratios when there is a mismatch between encoder
and muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/utils.c

index 4145097..9c59947 100644 (file)
@@ -2782,7 +2782,11 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
                 goto fail;
             }
             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");
+                av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between encoder "
+                       "(%d/%d) and muxer layer (%d/%d)\n",
+                       st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
+                       st->codec->sample_aspect_ratio.num,
+                       st->codec->sample_aspect_ratio.den);
                 ret = AVERROR(EINVAL);
                 goto fail;
             }