diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-03 02:56:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-03 03:14:10 +0200 |
commit | cbfdfbe846f872d4283579c8cbca42c90896905c (patch) | |
tree | adc2aebfe0b12ffa1a889dc72ab57bcb1e0ad9e0 /libavformat/utils.c | |
parent | 59bd0fef6691f5b23eebbd7dd2f3e74c8d60c6a7 (diff) | |
parent | 5dd045ebc11933dca4d6af06e6b1e62be56802f7 (diff) | |
download | ffmpeg-cbfdfbe846f872d4283579c8cbca42c90896905c.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ARM: ac3: update ff_ac3_extract_exponents_neon per 8b7b2d6
ARM: NEON optimised vector_clip_int32()
swscale: disable full_chroma_int when converting to non-24/32bpp RGB.
suggest to use av_get_bytes_per_sample() in av_get_bits_per_sample_format() doxy
ffmpeg: use av_get_bytes_per_sample() in place of av_get_bits_per_sample_fmt()
put_bits: remove ALT_BITSTREAM_WRITER
put_bits: always use intreadwrite.h macros
libavformat: Add an example how to use the metadata API
doxygen: Prefer member groups over grouping into modules
doxygen: be more permissive when searching for API examples
avformat: doxify the Metadata API
lavf: restore old behavior for custom AVIOContex with an AVFMT_NOFILE format.
lavf: use the correct pointer in av_open_input_stream().
avidec: infer absolute vs relative index from first packet
Conflicts:
libavformat/Makefile
libavformat/avidec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index da240f68e8..cfc70ecced 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -464,10 +464,16 @@ int av_open_input_stream(AVFormatContext **ic_ptr, err = AVERROR(ENOMEM); goto fail; } - ic->pb = pb; + if (pb && fmt && fmt->flags & AVFMT_NOFILE) + av_log(ic, AV_LOG_WARNING, "Custom AVIOContext makes no sense and " + "will be ignored with AVFMT_NOFILE format.\n"); + else + ic->pb = pb; - err = avformat_open_input(ic_ptr, filename, fmt, &opts); + err = avformat_open_input(&ic, filename, fmt, &opts); + ic->pb = ic->pb ? ic->pb : pb; // don't leak custom pb if it wasn't set above + *ic_ptr = ic; fail: av_dict_free(&opts); return err; |