summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <[email protected]>2015-04-16 13:47:20 +0200
committerMichael Niedermayer <[email protected]>2015-04-17 22:54:17 +0200
commite2691b809271b311c088075ad79f8f775258fd14 (patch)
treed973319e315cfcc6f0cf6ee9d1eb4660f2e677f6
parent3acadc89f495366a1c7de234b33df7464fd64acd (diff)
hls: skip to next segment if the current is unavailable
Apparently, some live streams can delete segments too early, maybe because the client is too far behind. In this case, it's better to skip the segment, instead of returning EOF. (Yes, the HLS demuxer actually returns AVERROR_EOF if opening the segment returns a 404 HTTP error.) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/hls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4a7d003f72..451b78eb98 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1087,7 +1087,8 @@ reload:
if (ret < 0) {
av_log(v->parent, AV_LOG_WARNING, "Failed to open segment of playlist %d\n",
v->index);
- return ret;
+ v->cur_seq_no += 1;
+ goto reload;
}
just_opened = 1;
}