diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-11-25 17:34:18 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-11-25 20:31:39 +0100 |
commit | 51e9f58e1c9c7e012ed7d10ade6a609221d346ef (patch) | |
tree | d9009da4394fa31cf64a5733123ff6d76164ef0b /libavutil/opt.c | |
parent | cf6c6134cd61e5ef19932cdba6cb00c1d89d554e (diff) | |
download | ffmpeg-51e9f58e1c9c7e012ed7d10ade6a609221d346ef.tar.gz |
lavu/opt: add support for reading pixel and sample format through av_get_int()
Simplify backward compatibility, when switching from AV_OPT_TYPE_INT to
AV_OPT_TYPE_SAMPLE/PIXEL_FMT.
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index a383783176..b9da67667e 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -71,6 +71,8 @@ static int read_number(const AVOption *o, void *dst, double *num, int *den, int6 { switch (o->type) { case AV_OPT_TYPE_FLAGS: *intnum = *(unsigned int*)dst;return 0; + case AV_OPT_TYPE_PIXEL_FMT: + case AV_OPT_TYPE_SAMPLE_FMT: case AV_OPT_TYPE_INT: *intnum = *(int *)dst;return 0; case AV_OPT_TYPE_INT64: *intnum = *(int64_t *)dst;return 0; case AV_OPT_TYPE_FLOAT: *num = *(float *)dst;return 0; |