avformat/utils: Ensure that AVFMT_FLAG_CUSTOM_IO is set before use
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Apr 2015 20:22:31 +0000 (22:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 22 Apr 2015 10:27:25 +0000 (12:27 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ba631b791435c395361e2026fc7419b341e57813)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 5465498..3a979c6 100644 (file)
@@ -508,6 +508,9 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
     if (options)
         av_dict_copy(&tmp, *options, 0);
 
+    if (s->pb) // must be before any goto fail
+        s->flags |= AVFMT_FLAG_CUSTOM_IO;
+
     if ((ret = av_opt_set_dict(s, &tmp)) < 0)
         goto fail;