aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-07-25 11:47:35 +0200
committerAnton Khirnov <anton@khirnov.net>2024-08-27 16:53:16 +0200
commitd89930f8666c563a96f1dc1835b450522b4cd6da (patch)
tree4c93449ff0edc5219bd2bd40326321f4494e28f9 /tests
parent4a5bb84515bab769b7702277abc7d07ea4c4d855 (diff)
downloadffmpeg-d89930f8666c563a96f1dc1835b450522b4cd6da.tar.gz
lavu/opt: add API for retrieving array-type option values
Previously one could only convert the entire array to a string, not access individual elements.
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/fate/opt6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt
index 578350bc33..b8812e3eff 100644
--- a/tests/ref/fate/opt
+++ b/tests/ref/fate/opt
@@ -154,6 +154,12 @@ av_opt_set("array_dict", NULL) -> 0
array_dict=NULL; nb_array_dict=0
av_opt_get("array_dict") -> NULL
+Testing av_opt_get_array()
+av_opt_get_array("array_int", 1, 3, INT)=0 -> [ 0, 42, 137 ]
+av_opt_get_array("array_int", 3, 2, DOUBLE)=0 -> [ 137.00, 2147483647.00 ]
+av_opt_get_array("array_int", 0, 5, STRING)=0 -> [ 5, 0, 42, 137, 2147483647 ]
+av_opt_get_array("array_dict", 0, 2, DICT)=0
+
Test av_opt_serialize()
num=0,unum=2147483648,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=hexagonal,bin=62696E00,bin1=,bin2=,num64=4294967296,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false,dict1=,dict2=happy\=\\:-),array_int=,array_str=str0|str\\|1|str\\\\2,array_dict=k00\=v\\\\\\\\00:k01\=v\\\,01\,k10\=v\\\\\=1\\\\:0
Setting entry with key 'num' to value '0'