aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-18 19:25:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-18 19:49:23 +0200
commit75511c293add07db1cca58dcd8b08c33fc2f1075 (patch)
treee36001943db29872c8b9adc37895426df2556fd0
parentac293b66851f6c4461eab03ca91af59d5ee4e02e (diff)
downloadffmpeg-75511c293add07db1cca58dcd8b08c33fc2f1075.tar.gz
dump_stream_format: fix division by 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/dump.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 2eb03b6715..a4a8d46427 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -297,6 +297,9 @@ static void dump_stream_format(AVFormatContext *ic, int i,
int g = av_gcd(st->time_base.num, st->time_base.den);
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
+ if (!g)
+ g = 1;
+
avcodec_string(buf, sizeof(buf), st->codec, is_output);
av_log(NULL, AV_LOG_INFO, " Stream #%d:%d", index, i);