[FFmpeg-devel] [PATCH] lavf/protocols: Fix compile warning of discarding 'const' qualifier from pointer target type

Linjie Fu linjie.fu at intel.com
Wed Mar 18 06:23:42 EET 2020


Signed-off-by: Linjie Fu <linjie.fu at intel.com>
---
 libavformat/protocols.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/protocols.c b/libavformat/protocols.c
index f1b8eab..cb19f77 100644
--- a/libavformat/protocols.c
+++ b/libavformat/protocols.c
@@ -95,9 +95,9 @@ const AVClass *ff_urlcontext_child_class_next(const AVClass *prev)
 
 const char *avio_enum_protocols(void **opaque, int output)
 {
-    const URLProtocol **p = *opaque;
+    URLProtocol **p = *opaque;
 
-    p = p ? p + 1 : url_protocols;
+    p = p ? p + 1 : (URLProtocol **)url_protocols;
     *opaque = p;
     if (!*p) {
         *opaque = NULL;
-- 
2.7.4



More information about the ffmpeg-devel mailing list