[FFmpeg-cvslog] avio: Free URLContext private data allocated via AVOptions

Martin Storsjö git at videolan.org
Fri Nov 11 02:53:03 CET 2011


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Nov  9 00:48:40 2011 +0200| [d10361b65856982fe17032590f490d494f1a01e4] | committer: Martin Storsjö

avio: Free URLContext private data allocated via AVOptions

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavformat/avio.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index a954aa8..8e18549 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list