add protocol deregister API 38/57538/3
authorji.yong.seo <ji.yong.seo@samsung.com>
Thu, 21 Jan 2016 04:20:53 +0000 (13:20 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 27 Jan 2016 06:30:32 +0000 (22:30 -0800)
Change-Id: I1407f526e68cafef9569fe86c8ac27a07d6ee3fd
Signed-off-by: ji.yong.seo <ji.yong.seo@samsung.com>
libavformat/avio.c [changed mode: 0644->0755]
libavformat/url.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index f68994c..e0ea4a5
@@ -105,6 +105,23 @@ int ffurl_register_protocol(URLProtocol *protocol)
     return 0;
 }
 
+int ffurl_deregister_protocol(URLProtocol *protocol)
+{
+    URLProtocol **p;
+
+    p = &first_protocol;
+
+    while (*p != NULL) {
+               if(!strcmp((*p)->name, protocol->name)) {
+                       *p = (*p)->next;
+                       continue;
+               }
+               p = &(*p)->next;
+    }
+
+    return 0;
+}
+
 static int url_alloc_for_protocol(URLContext **puc, struct URLProtocol *up,
                                   const char *filename, int flags,
                                   const AVIOInterruptCB *int_cb)
old mode 100644 (file)
new mode 100755 (executable)
index 40be4d5..b05128d
@@ -228,6 +228,11 @@ int ffurl_shutdown(URLContext *h, int flags);
 int ffurl_register_protocol(URLProtocol *protocol);
 
 /**
+ * Deregister the URLProtocol protocol.
+ */
+int ffurl_deregister_protocol(URLProtocol *protocol);
+
+/**
  * Check if the user has requested to interrup a blocking function
  * associated with cb.
  */