[FFmpeg-cvslog] hls: skip to next segment if the current is unavailable
wm4
git at videolan.org
Sat Apr 18 00:14:50 CEST 2015
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Thu Apr 16 13:47:20 2015 +0200| [e2691b809271b311c088075ad79f8f775258fd14] | committer: Michael Niedermayer
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 <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2691b809271b311c088075ad79f8f775258fd14
---
libavformat/hls.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 4a7d003..451b78e 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;
}
More information about the ffmpeg-cvslog
mailing list