[FFmpeg-cvslog] lavu/opt: add support for reading pixel and sample format through av_get_int()

Stefano Sabatini git at videolan.org
Sun Nov 25 20:38:38 CET 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sun Nov 25 17:34:18 2012 +0100| [51e9f58e1c9c7e012ed7d10ade6a609221d346ef] | committer: 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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51e9f58e1c9c7e012ed7d10ade6a609221d346ef
---

 libavutil/opt.c     |    2 ++
 libavutil/version.h |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index a383783..b9da676 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;
diff --git a/libavutil/version.h b/libavutil/version.h
index 9902f0f..8b9c813 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -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, \



More information about the ffmpeg-cvslog mailing list