[FFmpeg-cvslog] lavf: use the io_open callbacks for files opened from open_input() as well
Anton Khirnov
git at videolan.org
Mon Feb 29 16:39:34 CET 2016
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Feb 19 19:36:24 2016 +0100| [7fbb3b5b9857276b4cd17b2a530c7e0880d2bc0a] | committer: Anton Khirnov
lavf: use the io_open callbacks for files opened from open_input() as well
There is no real reason to treat them differently.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fbb3b5b9857276b4cd17b2a530c7e0880d2bc0a
---
libavformat/avformat.h | 6 +++---
libavformat/utils.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3dfbf64..8dab2b7 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1237,9 +1237,9 @@ typedef struct AVFormatContext {
/**
* A callback for opening new IO streams.
*
- * Certain muxers or demuxers (e.g. for various playlist-based formats) need
- * to open additional files during muxing or demuxing. This callback allows
- * the caller to provide custom IO in such cases.
+ * Whenever a muxer or a demuxer needs to open an IO stream (typically from
+ * avformat_open_input() for demuxers, but for certain formats can happen at
+ * other times as well), it will call this callback to obtain an IO context.
*
* @param s the format context
* @param pb on success, the newly opened IO context should be returned here
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e727c85..c5cc8b9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -200,8 +200,8 @@ static int init_input(AVFormatContext *s, const char *filename,
(!s->iformat && (s->iformat = av_probe_input_format(&pd, 0))))
return 0;
- if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ,
- &s->interrupt_callback, options)) < 0)
+ ret = s->io_open(s, &s->pb, filename, AVIO_FLAG_READ, options);
+ if (ret < 0)
return ret;
if (s->iformat)
return 0;
More information about the ffmpeg-cvslog
mailing list