[FFmpeg-devel] [PATCH 2/4] lavu/opt: add support for binary defaults

Lukasz Marek lukasz.m.luki2 at gmail.com
Sun Nov 9 23:22:47 CET 2014


Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
---
 libavutil/opt.c    | 2 ++
 tests/ref/fate/opt | 0
 2 files changed, 2 insertions(+)
 create mode 100644 tests/ref/fate/opt

diff --git a/libavutil/opt.c b/libavutil/opt.c
index bc62044..f0798a1 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1226,6 +1226,8 @@ void av_opt_set_defaults2(void *s, int mask, int flags)
                 write_number(s, opt, dst, 1, 1, opt->default_val.i64);
                 break;
             case AV_OPT_TYPE_BINARY:
+                set_string_binary(s, opt, opt->default_val.str, dst);
+                break;
             case AV_OPT_TYPE_DICT:
                 /* Cannot set defaults for these types */
             break;
diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt
new file mode 100644
index 0000000..e69de29
-- 
1.9.1



More information about the ffmpeg-devel mailing list