diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-11-05 12:30:21 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-11-13 13:21:46 +0100 |
commit | 32caa7b13cecca59213c73fa94dd683c2b003bfd (patch) | |
tree | 5d7285bd0ddc0418a607f441e8c366f68df69d4c /libavformat/options.c | |
parent | 9d77a8faf9568f02daf06903559473efb4050c34 (diff) | |
download | ffmpeg-32caa7b13cecca59213c73fa94dd683c2b003bfd.tar.gz |
lavf: pass options from AVFormatContext to avio.
Diffstat (limited to 'libavformat/options.c')
-rw-r--r-- | libavformat/options.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libavformat/options.c b/libavformat/options.c index 23a7e65369..66e01a4082 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "avio_internal.h" #include "libavutil/opt.h" /** @@ -40,6 +41,10 @@ static void *format_child_next(void *obj, void *prev) ((s->iformat && s->iformat->priv_class) || s->oformat && s->oformat->priv_class)) return s->priv_data; +#if !FF_API_OLD_AVIO + if (s->pb && s->pb->av_class && prev != s->pb) + return s->pb; +#endif return NULL; } @@ -59,9 +64,15 @@ static const AVClass *format_child_class_next(const AVClass *prev) while (prev && (ofmt = av_oformat_next(ofmt))) if (ofmt->priv_class == prev) break; - while (ofmt = av_oformat_next(ofmt)) - if (ofmt->priv_class) - return ofmt->priv_class; + if ((prev && ofmt) || (!prev)) + while (ofmt = av_oformat_next(ofmt)) + if (ofmt->priv_class) + return ofmt->priv_class; + +#if !FF_API_OLD_AVIO + if (prev != &ffio_url_class) + return &ffio_url_class; +#endif return NULL; } |