[FFmpeg-cvslog] libavcodec/opusenc: use correct format specifiers

Kyle Swanson git at videolan.org
Mon Mar 27 10:37:10 EEST 2017


ffmpeg | branch: master | Kyle Swanson <k at ylo.ph> | Sun Mar 26 13:48:28 2017 -0500| [b12693facf991f343cdf310690f59f69143b256f] | committer: Carl Eugen Hoyos

libavcodec/opusenc: use correct format specifiers

Squelches the following compiler warnings:

libavcodec/opusenc.c:1051:16: warning: format specifies type 'long' but
the argument has type 'long long' [-Wformat]
               avctx->bit_rate/1000, clipped_rate/1000);
               ^~~~~~~~~~~~~~~~~~~~
libavcodec/opusenc.c:1051:38: warning: format specifies type 'long' but
the argument has type 'long long' [-Wformat]
               avctx->bit_rate/1000, clipped_rate/1000);
                                     ^~~~~~~~~~~~~~~~~

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b12693facf991f343cdf310690f59f69143b256f
---

 libavcodec/opusenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c
index 56368db..cecc8f2 100644
--- a/libavcodec/opusenc.c
+++ b/libavcodec/opusenc.c
@@ -1047,7 +1047,7 @@ static av_cold int opus_encode_init(AVCodecContext *avctx)
         avctx->bit_rate = coupled*(96000) + (s->channels - coupled*2)*(48000);
     } else if (avctx->bit_rate < 6000 || avctx->bit_rate > 255000 * s->channels) {
         int64_t clipped_rate = av_clip(avctx->bit_rate, 6000, 255000 * s->channels);
-        av_log(avctx, AV_LOG_ERROR, "Unsupported bitrate %li kbps, clipping to %li kbps\n",
+        av_log(avctx, AV_LOG_ERROR, "Unsupported bitrate %"PRId64" kbps, clipping to %"PRId64" kbps\n",
                avctx->bit_rate/1000, clipped_rate/1000);
         avctx->bit_rate = clipped_rate;
     }



More information about the ffmpeg-cvslog mailing list