diff options
author | Anton Khirnov | 2011-08-23 07:11:26 +0200 |
---|---|---|
committer | Anton Khirnov | 2011-09-03 20:52:21 +0200 |
commit | c11fb8288d282da430f598bb029deccbacb31591 (patch) | |
tree | 22a1048ae72d776fd0681f063f391208d80171f7 /libavformat/options.c | |
parent | 5938e02185430ca711106aaec9b5622dbf588af3 (diff) |
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 'libavformat/options.c')
-rw-r--r-- | libavformat/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/options.c b/libavformat/options.c index 3ca8c83480..5ea0b181cb 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -38,7 +38,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit, i AVFormatContext *s = obj; AVInputFormat *ifmt = NULL; AVOutputFormat *ofmt = NULL; - if (s->priv_data) { + if (!(search_flags & AV_OPT_SEARCH_FAKE_OBJ) && s->priv_data) { if ((s->iformat && !s->iformat->priv_class) || (s->oformat && !s->oformat->priv_class)) return NULL; |