avprobe: do not call avio_close() on a custom context
authorAnton Khirnov <anton@khirnov.net>
Fri, 19 Feb 2016 13:18:15 +0000 (14:18 +0100)
committerAnton Khirnov <anton@khirnov.net>
Mon, 22 Feb 2016 10:28:26 +0000 (11:28 +0100)
avio_close() can only be called on AVIOContexts created by avio_open(2).

avprobe.c

index 2ab8ce0..63e6c2a 100644 (file)
--- a/avprobe.c
+++ b/avprobe.c
@@ -1025,7 +1025,8 @@ int main(int argc, char **argv)
     ret = probe_file(input_filename);
     probe_footer();
     avio_flush(probe_out);
-    avio_close(probe_out);
+    av_freep(&probe_out);
+    av_freep(&buffer);
 
     avformat_network_deinit();