lavf/mux: pass options to nested structs of priv data
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Tue, 29 Apr 2014 22:00:44 +0000 (00:00 +0200)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Fri, 2 May 2014 16:04:05 +0000 (18:04 +0200)
This commit allows to benefit from implementing child_next
callback for muxers' AVClasses.
Without that, options cannot be set in nested structs.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavformat/mux.c

index 6847ec342b8ad020b808fdbdf51f5f65e314bc62..7b4f7c77d355a212aa891773a2955aa591a17d41 100644 (file)
@@ -334,7 +334,7 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
         if (of->priv_class) {
             *(const AVClass **)s->priv_data = of->priv_class;
             av_opt_set_defaults(s->priv_data);
-            if ((ret = av_opt_set_dict(s->priv_data, &tmp)) < 0)
+            if ((ret = av_opt_set_dict2(s->priv_data, &tmp, AV_OPT_SEARCH_CHILDREN)) < 0)
                 goto fail;
         }
     }