summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-03 17:30:34 +0100
committerwm4 <wm4@nowhere>2013-11-07 23:55:45 +0100
commit391c087d752b5caa5f246b1891d654dd0a65f394 (patch)
tree27af30f3f808ecc0492052f927706090cefc65d8
parentb4f6e57d2c7fd724353c33602ed5367d7ac20e59 (diff)
downloadmpv-391c087d752b5caa5f246b1891d654dd0a65f394.tar.bz2
mpv-391c087d752b5caa5f246b1891d654dd0a65f394.tar.xz
stream: reconnecting doesn't make sense if stream is not seekable
This stops mpv from being stuck in reconnecting at the end of the file with some unseekable streams. Test URL: http://playerservices.streamtheworld.com/pls/CBC_R1_VCR_H.pls
-rw-r--r--stream/stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 186fc7c79d..01c1819dbb 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -387,6 +387,8 @@ static int stream_reconnect(stream_t *s)
#define RECONNECT_SLEEP_MS 1000
if (!s->streaming)
return 0;
+ if (!s->end_pos || !s->seek || !(s->flags & MP_STREAM_SEEK))
+ return 0;
int64_t pos = s->pos;
for (int retry = 0; retry < MAX_RECONNECT_RETRIES; retry++) {
mp_msg(MSGT_STREAM, MSGL_WARN,