summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2015-10-26 21:07:33 +0100
committerNicolas George <george@nsup.org>2015-11-07 16:04:09 +0100
commit47ea04ff1058cfd9cf780ad27eae5260a2a84353 (patch)
treea0d8785aa18aaf0101c4cf8938ed3aac1abda586 /tests
parent7037f9430b6223ec74080ecb2e58b25426f5f47d (diff)
lavu/opt: enhance printing durations.
Trim unneeded leading components and trailing zeros. Move the formating code in a separate function. Use the function also to format the default value, it was currently printed as plain integer, inconsistent to the way it is parsed.
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/fate/opt8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt
index e9132a5a1b..7b47d429c5 100644
--- a/tests/ref/fate/opt
+++ b/tests/ref/fate/opt
@@ -31,7 +31,7 @@ TestContext AVOptions:
-pix_fmt <pix_fmt> E....... set pixfmt (default 0bgr)
-sample_fmt <sample_fmt> E....... set samplefmt (default s16)
-video_rate <video_rate> E....... set videorate (default "25")
- -duration <duration> E....... set duration (default 1000)
+ -duration <duration> E....... set duration (default 0.001)
-color <color> E....... set color (default "pink")
-cl <channel_layout> E....... set channel layout (default 0x137)
-bin <binary> E....... set binary value
@@ -97,7 +97,7 @@ name: bool2 default:1 error:
name: bool3 default:1 error:
Test av_opt_serialize()
-num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0:00:00.001000,color=0xffc0cbff,cl=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
+num=0,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=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
Setting entry with key 'num' to value '0'
Setting entry with key 'toggle' to value '1'
Setting entry with key 'rational' to value '1/1'
@@ -108,7 +108,7 @@ Setting entry with key 'size' to value '200x300'
Setting entry with key 'pix_fmt' to value '0bgr'
Setting entry with key 'sample_fmt' to value 's16'
Setting entry with key 'video_rate' to value '25/1'
-Setting entry with key 'duration' to value '0:00:00.001000'
+Setting entry with key 'duration' to value '0.001'
Setting entry with key 'color' to value '0xffc0cbff'
Setting entry with key 'cl' to value '0x137'
Setting entry with key 'bin' to value '62696E00'
@@ -120,7 +120,7 @@ Setting entry with key 'dbl' to value '0.333333'
Setting entry with key 'bool1' to value 'auto'
Setting entry with key 'bool2' to value 'true'
Setting entry with key 'bool3' to value 'false'
-num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0:00:00.001000,color=0xffc0cbff,cl=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
+num=0,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=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
Testing av_set_options_string()
Setting options string ''