[FFmpeg-devel] [PATCH] avformat/rtmpcrypt: fix discarded const warning

Ganesh Ajjanagadde gajjanagadde at gmail.com
Fri Sep 18 21:45:48 CEST 2015


This patch silences a -Wdiscarded-qualifiers observed with GCC 5.2.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavformat/rtmpcrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmpcrypt.c b/libavformat/rtmpcrypt.c
index 2065ec6..447dbc2 100644
--- a/libavformat/rtmpcrypt.c
+++ b/libavformat/rtmpcrypt.c
@@ -300,7 +300,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)
-- 
2.5.2



More information about the ffmpeg-devel mailing list