Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-09-15 21:56:23 +0300
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-09-15 21:56:23 +0300
commit040ddd27bfca5c0427a0bb68ac1b45dc374cd699 (patch)
tree0819fdde779e4943b07ef8d9b96645403c8b7015 /libavcodec/utils.c
parent72db5e96fc560c0b1e78099feeb3a90aa27eb7e4 (diff)
lavc/utils: Correctly show bit_rate >INT_MAX.
Fixes ticket #2089.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ababdf3cfe..19548e25a7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1118,9 +1118,9 @@ static void get_subtitle_defaults(AVSubtitle *sub)
sub->pts = AV_NOPTS_VALUE;
}
-static int get_bit_rate(AVCodecContext *ctx)
+static int64_t get_bit_rate(AVCodecContext *ctx)
{
- int bit_rate;
+ int64_t bit_rate;
int bits_per_sample;
switch (ctx->codec_type) {
@@ -2653,7 +2653,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
const char *codec_name;
const char *profile = NULL;
const AVCodec *p;
- int bitrate;
+ int64_t bitrate;
int new_line = 0;
AVRational display_aspect_ratio;
const char *separator = enc->dump_separator ? (const char *)enc->dump_separator : ", ";
@@ -2825,7 +2825,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
bitrate = get_bit_rate(enc);
if (bitrate != 0) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
- ", %d kb/s", bitrate / 1000);
+ ", %"PRId64" kb/s", bitrate / 1000);
} else if (enc->rc_max_rate > 0) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", max. %"PRId64" kb/s", (int64_t)enc->rc_max_rate / 1000);