Browse code

avformat/avio: free url/avio options

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2016/01/29 07:49:06
Showing 2 changed files
... ...
@@ -412,6 +412,7 @@ int ffurl_closep(URLContext **hh)
412 412
             av_opt_free(h->priv_data);
413 413
         av_freep(&h->priv_data);
414 414
     }
415
+    av_opt_free(h);
415 416
     av_freep(hh);
416 417
     return ret;
417 418
 }
... ...
@@ -956,6 +956,7 @@ int avio_close(AVIOContext *s)
956 956
         av_log(s, AV_LOG_DEBUG, "Statistics: %d seeks, %d writeouts\n", s->seek_count, s->writeout_count);
957 957
     else
958 958
         av_log(s, AV_LOG_DEBUG, "Statistics: %"PRId64" bytes read, %d seeks\n", s->bytes_read, s->seek_count);
959
+    av_opt_free(s);
959 960
     av_free(s);
960 961
     return ffurl_close(h);
961 962
 }