[FFmpeg-devel] [PATCH 2/2] lavf/mux: pass options to nested structs of priv data

Lukasz Marek lukasz.m.luki2 at gmail.com
Wed Apr 30 00:04:37 CEST 2014


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 at gmail.com>
---
 libavformat/mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 6847ec3..7b4f7c7 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -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;
         }
     }
-- 
1.9.1



More information about the ffmpeg-devel mailing list