summaryrefslogtreecommitdiff
path: root/libavformat/options.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-23 07:11:26 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-03 20:52:21 +0200
commitc11fb8288d282da430f598bb029deccbacb31591 (patch)
tree22a1048ae72d776fd0681f063f391208d80171f7 /libavformat/options.c
parent5938e02185430ca711106aaec9b5622dbf588af3 (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.c2
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;