diff options
author | Clément Bœsch <u@pkh.me> | 2015-09-08 22:49:33 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2015-09-08 22:49:33 +0200 |
commit | 9571a56009f332c3810fe70a5c5295581256e5d1 (patch) | |
tree | 8e420b740a26a2fd23eb627186e246e5bf2c3baf | |
parent | 0b93c6d83167e08405ab4ebbeec6c74d28de002e (diff) | |
download | ffmpeg-9571a56009f332c3810fe70a5c5295581256e5d1.tar.gz |
avutil/opt: refactor pixel/sample fmt common case
-rw-r--r-- | libavutil/opt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 7a0911b621..ce80de0596 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1126,8 +1126,10 @@ void av_opt_set_defaults2(void *s, int mask, int flags) case AV_OPT_TYPE_INT64: case AV_OPT_TYPE_DURATION: case AV_OPT_TYPE_CHANNEL_LAYOUT: + case AV_OPT_TYPE_PIXEL_FMT: + case AV_OPT_TYPE_SAMPLE_FMT: write_number(s, opt, dst, 1, 1, opt->default_val.i64); - break; + break; case AV_OPT_TYPE_DOUBLE: case AV_OPT_TYPE_FLOAT: { double val; @@ -1153,12 +1155,6 @@ void av_opt_set_defaults2(void *s, int mask, int flags) case AV_OPT_TYPE_VIDEO_RATE: set_string_video_rate(s, opt, opt->default_val.str, dst); break; - case AV_OPT_TYPE_PIXEL_FMT: - write_number(s, opt, dst, 1, 1, opt->default_val.i64); - break; - case AV_OPT_TYPE_SAMPLE_FMT: - 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; |