aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-09-22 01:33:22 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-09-22 01:33:22 +0200
commit724cf83f100065ddabf827f55bf7ae9785875b4c (patch)
tree1ab91c813a08d35c94d1214aa431070481bf1476 /libavcodec
parentc34c0e3a649eb4fe8e6fb756b7784b7bfd9bd638 (diff)
downloadffmpeg-724cf83f100065ddabf827f55bf7ae9785875b4c.tar.gz
Remove some unneeded casts of bit_rate.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dcaenc.c2
-rw-r--r--libavcodec/libfdk-aacenc.c2
-rw-r--r--libavcodec/libgsmenc.c2
-rw-r--r--libavcodec/libopusenc.c4
-rw-r--r--libavcodec/libspeexenc.c4
-rw-r--r--libavcodec/mpegvideo_enc.c2
-rw-r--r--libavcodec/pcm-bluray.c2
-rw-r--r--libavcodec/pcm-dvd.c2
-rw-r--r--libavcodec/sipr.c2
-rw-r--r--libavcodec/utils.c4
-rw-r--r--libavcodec/wma.c2
-rw-r--r--libavcodec/wmaenc.c2
12 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index c1d72bfd16..dd601ffae0 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -216,7 +216,7 @@ static int encode_init(AVCodecContext *avctx)
c->samplerate_index = i;
if (avctx->bit_rate < 32000 || avctx->bit_rate > 3840000) {
- av_log(avctx, AV_LOG_ERROR, "Bit rate %"PRId64" not supported.", (int64_t)avctx->bit_rate);
+ av_log(avctx, AV_LOG_ERROR, "Bit rate %"PRId64" not supported.", avctx->bit_rate);
return AVERROR(EINVAL);
}
for (i = 0; ff_dca_bit_rates[i] < avctx->bit_rate; i++)
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index 98a817b537..0e2051b468 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -216,7 +216,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if ((err = aacEncoder_SetParam(s->handle, AACENC_BITRATE,
avctx->bit_rate)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to set the bitrate %"PRId64": %s\n",
- (int64_t)avctx->bit_rate, aac_get_error(err));
+ avctx->bit_rate, aac_get_error(err));
goto error;
}
}
diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c
index 69ce439ec1..e25db95181 100644
--- a/libavcodec/libgsmenc.c
+++ b/libavcodec/libgsmenc.c
@@ -63,7 +63,7 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
avctx->bit_rate != 13200 /* Very common */ &&
avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) {
av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %"PRId64"bps\n",
- (int64_t)avctx->bit_rate);
+ avctx->bit_rate);
if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL)
return -1;
}
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index 77d8310048..3d88c296d3 100644
--- a/libavcodec/libopusenc.c
+++ b/libavcodec/libopusenc.c
@@ -351,12 +351,12 @@ static av_cold int libopus_encode_init(AVCodecContext *avctx)
avctx->bit_rate = 64000 * opus->stream_count +
32000 * coupled_stream_count;
av_log(avctx, AV_LOG_WARNING,
- "No bit rate set. Defaulting to %"PRId64" bps.\n", (int64_t)avctx->bit_rate);
+ "No bit rate set. Defaulting to %"PRId64" bps.\n", avctx->bit_rate);
}
if (avctx->bit_rate < 500 || avctx->bit_rate > 256000 * avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "The bit rate %"PRId64" bps is unsupported. "
- "Please choose a value between 500 and %d.\n", (int64_t)avctx->bit_rate,
+ "Please choose a value between 500 and %d.\n", avctx->bit_rate,
256000 * avctx->channels);
ret = AVERROR(EINVAL);
goto fail;
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 4bdb9618dd..a2b07a41cb 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -125,10 +125,10 @@ static av_cold void print_enc_params(AVCodecContext *avctx,
av_log(avctx, AV_LOG_DEBUG, " quality: %f\n", s->vbr_quality);
} else if (s->abr) {
av_log(avctx, AV_LOG_DEBUG, "rate control: ABR\n");
- av_log(avctx, AV_LOG_DEBUG, " bitrate: %"PRId64" bps\n", (int64_t)avctx->bit_rate);
+ av_log(avctx, AV_LOG_DEBUG, " bitrate: %"PRId64" bps\n", avctx->bit_rate);
} else {
av_log(avctx, AV_LOG_DEBUG, "rate control: CBR\n");
- av_log(avctx, AV_LOG_DEBUG, " bitrate: %"PRId64" bps\n", (int64_t)avctx->bit_rate);
+ av_log(avctx, AV_LOG_DEBUG, " bitrate: %"PRId64" bps\n", avctx->bit_rate);
}
av_log(avctx, AV_LOG_DEBUG, "complexity: %d\n",
avctx->compression_level);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 918728391d..5765ef339f 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -506,7 +506,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->bit_rate * av_q2d(avctx->time_base) >
avctx->bit_rate_tolerance) {
av_log(avctx, AV_LOG_WARNING,
- "bitrate tolerance %d too small for bitrate %"PRId64", overriding\n", avctx->bit_rate_tolerance, (int64_t)avctx->bit_rate);
+ "bitrate tolerance %d too small for bitrate %"PRId64", overriding\n", avctx->bit_rate_tolerance, avctx->bit_rate);
avctx->bit_rate_tolerance = 5 * avctx->bit_rate * av_q2d(avctx->time_base);
}
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
index 22c1c08bcf..517d7b518c 100644
--- a/libavcodec/pcm-bluray.c
+++ b/libavcodec/pcm-bluray.c
@@ -119,7 +119,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
ff_dlog(avctx,
"pcm_bluray_parse_header: %d channels, %d bits per sample, %d Hz, %"PRId64" bit/s\n",
avctx->channels, avctx->bits_per_coded_sample,
- avctx->sample_rate, (int64_t)avctx->bit_rate);
+ avctx->sample_rate, avctx->bit_rate);
return 0;
}
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 04c321e677..0a751a8191 100644
--- a/libavcodec/pcm-dvd.c
+++ b/libavcodec/pcm-dvd.c
@@ -142,7 +142,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header)
ff_dlog(avctx,
"pcm_dvd_parse_header: %d channels, %d bits per sample, %d Hz, %"PRId64" bit/s\n",
avctx->channels, avctx->bits_per_coded_sample,
- avctx->sample_rate, (int64_t)avctx->bit_rate);
+ avctx->sample_rate, avctx->bit_rate);
s->last_header = header_int;
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index 70d460a678..1b6de25fff 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -494,7 +494,7 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
else ctx->mode = MODE_5k0;
av_log(avctx, AV_LOG_WARNING,
"Invalid block_align: %d. Mode %s guessed based on bitrate: %"PRId64"\n",
- avctx->block_align, modes[ctx->mode].mode_name, (int64_t)avctx->bit_rate);
+ avctx->block_align, modes[ctx->mode].mode_name, avctx->bit_rate);
}
av_log(avctx, AV_LOG_DEBUG, "Mode: %s\n", modes[ctx->mode].mode_name);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index baf4992b19..9551f312e7 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -967,7 +967,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
if ( (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO)
&& avctx->bit_rate>0 && avctx->bit_rate<1000) {
- av_log(avctx, AV_LOG_WARNING, "Bitrate %"PRId64" is extremely low, maybe you mean %"PRId64"k\n", (int64_t)avctx->bit_rate, (int64_t)avctx->bit_rate);
+ av_log(avctx, AV_LOG_WARNING, "Bitrate %"PRId64" is extremely low, maybe you mean %"PRId64"k\n", avctx->bit_rate, avctx->bit_rate);
}
if (!avctx->rc_initial_buffer_occupancy)
@@ -1522,7 +1522,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
", %"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);
+ ", max. %"PRId64" kb/s", enc->rc_max_rate / 1000);
}
}
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index f70937fe75..b4992095ec 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -186,7 +186,7 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2)
}
ff_dlog(s->avctx, "flags2=0x%x\n", flags2);
ff_dlog(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%"PRId64" block_align=%d\n",
- s->version, avctx->channels, avctx->sample_rate, (int64_t)avctx->bit_rate,
+ s->version, avctx->channels, avctx->sample_rate, avctx->bit_rate,
avctx->block_align);
ff_dlog(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n",
bps, bps1, high_freq, s->byte_offset_bits);
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index c68babd549..091bc2ac3b 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -53,7 +53,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
if (avctx->bit_rate < 24 * 1000) {
av_log(avctx, AV_LOG_ERROR,
"bitrate too low: got %"PRId64", need 24000 or higher\n",
- (int64_t)avctx->bit_rate);
+ avctx->bit_rate);
return AVERROR(EINVAL);
}