lavu/opt: add support for binary defaults
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Sun, 9 Nov 2014 22:09:07 +0000 (23:09 +0100)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Tue, 11 Nov 2014 20:52:26 +0000 (21:52 +0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavutil/opt.c
tests/ref/fate/opt [new file with mode: 0644]

index c064357..21506f7 100644 (file)
@@ -1225,6 +1225,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 (file)
index 0000000..e69de29