diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-04 04:11:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-04 04:11:53 +0200 |
commit | 1889c6724a449b2e4826612d3b72efc76dbfb713 (patch) | |
tree | 05abce06cd1151955b1f1280721044584012ee51 /libavcodec | |
parent | ca4d71b149ebe32aeaf617ffccf362624b9aafb1 (diff) | |
parent | e955a682e125d44143415ff2b96a99a4dac78da2 (diff) | |
download | ffmpeg-1889c6724a449b2e4826612d3b72efc76dbfb713.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
AVOptions: fix av_set_string3() doxy to match reality.
cmdutils: get rid of dummy contexts for examining AVOptions.
lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions.
AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
cpu detection: avoid a signed overflow
Conflicts:
avconv.c
cmdutils.c
doc/APIchanges
ffmpeg.c
libavcodec/options.c
libavcodec/version.h
libavformat/version.h
libavutil/avutil.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 8 | ||||
-rw-r--r-- | libavcodec/options.c | 7 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 9690bd1bbe..3a3065f4d1 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4417,4 +4417,12 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); */ enum AVMediaType avcodec_get_type(enum CodecID codec_id); +/** + * Get the AVClass for AVCodecContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avcodec_get_class(void); + #endif /* AVCODEC_AVCODEC_H */ diff --git a/libavcodec/options.c b/libavcodec/options.c index f481ad5e02..728e67670f 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -44,7 +44,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit, i AVCodecContext *s = obj; AVCodec *c = NULL; - if (s->priv_data) { + if (!(search_flags & AV_OPT_SEARCH_FAKE_OBJ) && s->priv_data) { if (s->codec && s->codec->priv_class) return av_opt_find(s->priv_data, name, unit, opt_flags, search_flags); return NULL; @@ -662,3 +662,8 @@ fail: av_freep(&dest->rc_eq); return AVERROR(ENOMEM); } + +const AVClass *avcodec_get_class(void) +{ + return &av_codec_context_class; +} diff --git a/libavcodec/version.h b/libavcodec/version.h index 77009c5483..268db0b844 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -21,7 +21,7 @@ #define AVCODEC_VERSION_H #define LIBAVCODEC_VERSION_MAJOR 53 -#define LIBAVCODEC_VERSION_MINOR 12 +#define LIBAVCODEC_VERSION_MINOR 13 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |