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>
Wed, 21 Sep 2011 12:28:57 +0000 (14:28 +0200)
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 63d64228a7f31d534e3bcae87cbd37f4a0ae2dd6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/utils.c

index 2cb096e..d9d154e 100644 (file)
@@ -469,8 +469,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;
 }