diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-15 03:13:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-15 03:13:42 +0100 |
commit | a72580fc9efeb674257b4754ca5de0fa34b09be8 (patch) | |
tree | 317e10288d30721f1f20c6c5bb9d99945d4351bd /libavformat/options.c | |
parent | be4c9a440f4e8b6ea01112d98a2cc128b8c52295 (diff) | |
parent | 3f5d6a665aba439a9309ed735e71403d236a313d (diff) | |
download | ffmpeg-a72580fc9efeb674257b4754ca5de0fa34b09be8.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
binkvideo: simplify and remove invalid shifts
pulse: compute frame_duration once and fix it
lavf: simplify format_child_class_next()
hwaccel: OS X Video Decoder Acceleration (VDA) support.
doc: add support for an optional navigation bar in texi2html pages
Conflicts:
configure
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/vda.c
libavcodec/vda.h
libavcodec/vda_h264.c
libavcodec/vda_internal.h
libavcodec/version.h
libavformat/options.c
libavutil/avutil.h
libavutil/pixfmt.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/options.c')
-rw-r--r-- | libavformat/options.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/libavformat/options.c b/libavformat/options.c index 4afb8b52bc..3290f92a37 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -53,30 +53,29 @@ static const AVClass *format_child_class_next(const AVClass *prev) AVInputFormat *ifmt = NULL; AVOutputFormat *ofmt = NULL; - while (prev && (ifmt = av_iformat_next(ifmt))) - if (ifmt->priv_class == prev){ - prev = NULL; - break; - } if (!prev) +#if !FF_API_OLD_AVIO + return &ffio_url_class; +#else + prev = (void *)&ifmt; // Dummy pointer; +#endif + + while ((ifmt = av_iformat_next(ifmt))) + if (ifmt->priv_class == prev) + break; + + if (!ifmt) + while ((ofmt = av_oformat_next(ofmt))) + if (ofmt->priv_class == prev) + break; + if (!ofmt) while (ifmt = av_iformat_next(ifmt)) if (ifmt->priv_class) return ifmt->priv_class; - while (prev && (ofmt = av_oformat_next(ofmt))) - if (ofmt->priv_class == prev){ - prev = NULL; - break; - } - if (!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 + while (ofmt = av_oformat_next(ofmt)) + if (ofmt->priv_class) + return ofmt->priv_class; return NULL; } |