Browse Source

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>
tags/n2.3
Anssi Hannula 11 years ago
parent
commit
cc1162d775
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/hls.c

+ 3
- 0
libavformat/hls.c View File

@@ -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


Loading…
Cancel
Save