summaryrefslogtreecommitdiffstats
path: root/libavformat/options.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-13 23:43:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-14 00:33:39 +0100
commit5f268ca5c57f3ad3050b58f513651c17304d3653 (patch)
treef66ad7e5c4fd5656db9a95218f2ad433a982d81b /libavformat/options.c
parent4fa6e9d0b40653010b35278f7e8b556958341205 (diff)
parent32caa7b13cecca59213c73fa94dd683c2b003bfd (diff)
downloadffmpeg-streaming-5f268ca5c57f3ad3050b58f513651c17304d3653.zip
ffmpeg-streaming-5f268ca5c57f3ad3050b58f513651c17304d3653.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/options.c')
-rw-r--r--libavformat/options.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/libavformat/options.c b/libavformat/options.c
index 64bc7a89..4afb8b5 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;
}
@@ -49,19 +54,29 @@ static const AVClass *format_child_class_next(const AVClass *prev)
AVOutputFormat *ofmt = NULL;
while (prev && (ifmt = av_iformat_next(ifmt)))
- if (ifmt->priv_class == prev)
+ if (ifmt->priv_class == prev){
+ prev = NULL;
break;
- if ((prev && ifmt) || (!prev))
+ }
+ if (!prev)
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)
+ if (ofmt->priv_class == prev){
+ prev = NULL;
break;
- while (ofmt = av_oformat_next(ofmt))
- if (ofmt->priv_class)
- return ofmt->priv_class;
+ }
+ 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
return NULL;
}
OpenPOWER on IntegriCloud