diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-09-15 17:29:38 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-09-15 18:02:47 +0200 |
commit | c311713ca99cb0556609972ba60d3634dc96c7a0 (patch) | |
tree | e664c2e39639f0189fe9255fb7dda2ef86a22869 /libavformat/utils.c | |
parent | 7404f3bdb90e6a5dcb59bc0a091e2c5c038e557d (diff) | |
download | ffmpeg-c311713ca99cb0556609972ba60d3634dc96c7a0.tar.gz |
lavf: Switch bitrate to 64bit unless compatibility with avconv was requested.
Based on a patch by Steve Swanson, swanysteve at gmail.
Fixes ticket #2089.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 24eacf3967..96a1e8642a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2369,7 +2369,7 @@ static void update_stream_timings(AVFormatContext *ic) /* compute the bitrate */ double bitrate = (double) filesize * 8.0 * AV_TIME_BASE / (double) ic->duration; - if (bitrate >= 0 && bitrate <= INT_MAX) + if (bitrate >= 0 && (!AV_HAVE_INCOMPATIBLE_LIBAV_ABI || bitrate <= INT_MAX)) ic->bit_rate = bitrate; } } @@ -2614,10 +2614,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) (double) st->duration / AV_TIME_BASE); } av_log(ic, AV_LOG_TRACE, - "stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n", + "stream: start_time: %0.3f duration: %0.3f bitrate=%"PRId64" kb/s\n", (double) ic->start_time / AV_TIME_BASE, (double) ic->duration / AV_TIME_BASE, - ic->bit_rate / 1000); + (int64_t)ic->bit_rate / 1000); } } |