diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-08-23 07:11:26 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-09-03 20:52:21 +0200 |
commit | c11fb8288d282da430f598bb029deccbacb31591 (patch) | |
tree | 22a1048ae72d776fd0681f063f391208d80171f7 /libavcodec/options.c | |
parent | 5938e02185430ca711106aaec9b5622dbf588af3 (diff) | |
download | ffmpeg-c11fb8288d282da430f598bb029deccbacb31591.tar.gz |
AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r-- | libavcodec/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c index a715dfafcb..97525634d8 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->priv_class) return av_opt_find(s->priv_data, name, unit, opt_flags, search_flags); return NULL; |