aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2013-12-28 09:42:32 +0200
committerAnssi Hannula <anssi.hannula@iki.fi>2014-04-06 17:55:02 +0300
commitcc1162d7751caf2e35387b1beb6d75b65a28548a (patch)
tree943c28ef925dcd73db3b150e7f3efd73ee08df57 /libavformat
parentedf4406c4dda0bd9b8ea20fa6f901a77d6a0902b (diff)
downloadffmpeg-cc1162d7751caf2e35387b1beb6d75b65a28548a.tar.gz
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@iki.fi>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/hls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index fdf22e3c57..af7c34ce77 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