[FFmpeg-cvslog] lavf/rtmpcrypt: Add a cast to silence an unavoidable warning.

Carl Eugen Hoyos git at videolan.org
Thu Apr 26 14:46:04 EEST 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Mon Apr 16 00:14:24 2018 +0200| [3914a76db687b4a94878d643da21bf0a217b6472] | committer: Carl Eugen Hoyos

lavf/rtmpcrypt: Add a cast to silence an unavoidable warning.

The av_rc4_crypt() documentation allows src == dst.

Silences the following warning:
libavformat/rtmpcrypt.c:304:36: warning: passing argument 2 of 'av_rc4_crypt' discards 'const' qualifier from pointer target type

Reported-by: Reino Wijnsma

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

 libavformat/rtmpcrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpcrypt.c b/libavformat/rtmpcrypt.c
index c41ae4308f..253b8ca2ce 100644
--- a/libavformat/rtmpcrypt.c
+++ b/libavformat/rtmpcrypt.c
@@ -301,7 +301,7 @@ static int rtmpe_write(URLContext *h, const uint8_t *buf, int size)
 
     if (rt->handshaked) {
         /* encrypt data to send to the server */
-        av_rc4_crypt(&rt->key_out, buf, buf, size, NULL, 1);
+        av_rc4_crypt(&rt->key_out, (uint8_t *)buf, buf, size, NULL, 1);
     }
 
     if ((ret = ffurl_write(rt->stream, buf, size)) < 0)



More information about the ffmpeg-cvslog mailing list