[FFmpeg-cvslog] avformat/hls: always return EOF for unneeded playlist streams
Anssi Hannula
git at videolan.org
Sun Apr 6 16:56:39 CEST 2014
ffmpeg | branch: master | Anssi Hannula <anssi.hannula at iki.fi> | Sat Dec 28 09:42:32 2013 +0200| [cc1162d7751caf2e35387b1beb6d75b65a28548a] | committer: Anssi Hannula
avformat/hls: always return EOF for unneeded playlist streams
Even if we returned AVERROR_EOF previously due to playlist no longer
being needed, we may still be called again, and we do not want to
trigger a segment download in that case.
Signed-off-by: Anssi Hannula <anssi.hannula at iki.fi>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc1162d7751caf2e35387b1beb6d75b65a28548a
---
libavformat/hls.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index fdf22e3..af7c34c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -653,6 +653,9 @@ static int read_data(void *opaque, uint8_t *buf, int buf_size)
HLSContext *c = v->parent->priv_data;
int ret, i;
+ if (!v->needed)
+ return AVERROR_EOF;
+
restart:
if (!v->input) {
/* If this is a live stream and the reload interval has elapsed since
More information about the ffmpeg-cvslog
mailing list