aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-04-03 21:07:06 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-04-03 21:13:50 +0200
commitc4367f950d5bc8a3a2979182d5aef7bd94949f93 (patch)
tree4b5acfe6fa6e48dd0bb935fb58e2d05a76b85df0
parent036079ce34311547be5940c5d856db5498fae029 (diff)
downloadffmpeg-c4367f950d5bc8a3a2979182d5aef7bd94949f93.tar.gz
Fix codec fps diplay for very small fps.
Fixes codec banner for the sample from ticket #4369.
-rw-r--r--libavformat/dump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 56b37ff7d8..9a7035c323 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -118,7 +118,9 @@ void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_paylo
static void print_fps(double d, const char *postfix)
{
uint64_t v = lrintf(d * 100);
- if (v % 100)
+ if (!v)
+ av_log(NULL, AV_LOG_INFO, "%1.4f %s", d, postfix);
+ else if (v % 100)
av_log(NULL, AV_LOG_INFO, "%3.2f %s", d, postfix);
else if (v % (100 * 1000))
av_log(NULL, AV_LOG_INFO, "%1.0f %s", d, postfix);