Browse Source

dump_stream_format: fix division by 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
75511c293a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/dump.c

+ 3
- 0
libavformat/dump.c View File

@@ -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);



Loading…
Cancel
Save