diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-04-16 13:47:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-17 22:54:17 +0200 |
commit | e2691b809271b311c088075ad79f8f775258fd14 (patch) | |
tree | d973319e315cfcc6f0cf6ee9d1eb4660f2e677f6 /libavformat/hls.c | |
parent | 3acadc89f495366a1c7de234b33df7464fd64acd (diff) | |
download | ffmpeg-e2691b809271b311c088075ad79f8f775258fd14.tar.gz |
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@gmx.at>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r-- | libavformat/hls.c | 3 |
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; } |