]> git.sesse.net Git - ffmpeg/commitdiff
avio: Free URLContext private data allocated via AVOptions
authorMartin Storsjö <martin@martin.st>
Tue, 8 Nov 2011 22:48:40 +0000 (00:48 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 10 Nov 2011 08:51:06 +0000 (10:51 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/avio.c

index a954aa8170a8feb5c30e81879d59f79525e9a99b..8e1854976e267734568ffa18ac2cd4e74dbc2668 100644 (file)
@@ -335,8 +335,11 @@ int ffurl_close(URLContext *h)
 #if CONFIG_NETWORK
     ff_network_close();
 #endif
-    if (h->prot->priv_data_size)
+    if (h->prot->priv_data_size) {
+        if (h->prot->priv_data_class)
+            av_opt_free(h->priv_data);
         av_free(h->priv_data);
+    }
     av_free(h);
     return ret;
 }