summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-24 11:42:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-24 11:42:42 +0200
commitf48366c7040ab2544a1d624f0a927a0b7780dd06 (patch)
tree615c012103362599ee8deff39d597b8e7eb962cb /libavformat
parenta620c8321efcf51e3d35462a5b7f088815faed14 (diff)
parente21307a2b024938c6714f57c0524bdec72d607c7 (diff)
downloadffmpeg-streaming-f48366c7040ab2544a1d624f0a927a0b7780dd06.zip
ffmpeg-streaming-f48366c7040ab2544a1d624f0a927a0b7780dd06.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf: don't abort if both encoder and muxer aspect ratios are not set Conflicts: libavformat/mux.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mux.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 34c9328..bb72a41 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -273,13 +273,18 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
if (av_cmp_q(st->sample_aspect_ratio, codec->sample_aspect_ratio)
&& FFABS(av_q2d(st->sample_aspect_ratio) - av_q2d(codec->sample_aspect_ratio)) > 0.004*av_q2d(st->sample_aspect_ratio)
) {
- av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "
- "(%d/%d) and encoder layer (%d/%d)\n",
- st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
- codec->sample_aspect_ratio.num,
- codec->sample_aspect_ratio.den);
- ret = AVERROR(EINVAL);
- goto fail;
+ if (st->sample_aspect_ratio.num != 0 &&
+ st->sample_aspect_ratio.den != 0 &&
+ codec->sample_aspect_ratio.den != 0 &&
+ codec->sample_aspect_ratio.den != 0) {
+ av_log(s, AV_LOG_ERROR, "Aspect ratio mismatch between muxer "
+ "(%d/%d) and encoder layer (%d/%d)\n",
+ st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
+ codec->sample_aspect_ratio.num,
+ codec->sample_aspect_ratio.den);
+ ret = AVERROR(EINVAL);
+ goto fail;
+ }
}
break;
}
OpenPOWER on IntegriCloud