]> git.sesse.net Git - ffmpeg/commitdiff
lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
authorDavid Goldwich <david.goldwich@gmail.com>
Sat, 17 Sep 2011 11:50:35 +0000 (13:50 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 19 Sep 2011 10:03:56 +0000 (12:03 +0200)
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/utils.c

index ae71763a87c187432fc9cd4ac3de3c14803ccd76..05d4fda52cf268b5a7ced6afea1d380834f0d4f1 100644 (file)
@@ -470,8 +470,8 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
         goto fail;
     ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above
 
-    *ic_ptr = ic;
 fail:
+    *ic_ptr = ic;
     av_dict_free(&opts);
     return err;
 }