lavf: initialize demuxer private options.
authorAnton Khirnov <anton@khirnov.net>
Thu, 26 May 2011 04:59:08 +0000 (06:59 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 26 May 2011 18:03:26 +0000 (20:03 +0200)
libavformat/utils.c

index 89ab108..b844ab9 100644 (file)
@@ -424,6 +424,10 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
             err = AVERROR(ENOMEM);
             goto fail;
         }
+        if (fmt->priv_class) {
+            *(const AVClass**)ic->priv_data = fmt->priv_class;
+            av_opt_set_defaults(ic->priv_data);
+        }
     } else {
         ic->priv_data = NULL;
     }