ffmpeg | branch: release/2.4 | Andreas Cadhalpun <andreas.cadhal...@googlemail.com> | Thu Nov 26 01:15:28 2015 +0100| [db13758b88384feb3f430d936a391af452f68313] | committer: Andreas Cadhalpun
avcodec: avoid division by zero in avcodec_string Actually time_base should not be 0/0, but the proper fix is part of commit 7ea1b34, which can't be backported, as it changes API. Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db13758b88384feb3f430d936a391af452f68313 --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 12cf577..0901e75 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2970,6 +2970,8 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) } if (av_log_get_level() >= AV_LOG_DEBUG) { int g = av_gcd(enc->time_base.num, enc->time_base.den); + if (!g) + g = 1; snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %d/%d", enc->time_base.num / g, enc->time_base.den / g); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog