Commit 51e9f58e authored by Stefano Sabatini's avatar Stefano Sabatini

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.
parent cf6c6134
......@@ -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;
......
......@@ -76,7 +76,7 @@
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 9
#define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_MICRO 102
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment