From c11fb8288d282da430f598bb029deccbacb31591 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 23 Aug 2011 07:11:26 +0200 Subject: 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. --- libavformat/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/options.c') 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; -- cgit v1.2.3