summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-03-21 14:48:01 +0100
committerwm4 <wm4@nowhere>2018-03-26 19:47:07 +0200
commit7d10728aaadd171bc5e25545dae1c7dedd5145f7 (patch)
treef14a58530756c5222daeaee491630188d5daf7c4 /stream/stream.c
parent965ba23303d980c239e2b0191488766cfa7b0f75 (diff)
downloadmpv-7d10728aaadd171bc5e25545dae1c7dedd5145f7.tar.bz2
mpv-7d10728aaadd171bc5e25545dae1c7dedd5145f7.tar.xz
demux, stream: ignore packets and errors on forced exit
When this happens, network calls are forcibly aborted (more or less), but demuxers might keep going, as most of them do not check for forced exits properly. This can possibly lead to broken packets being added. Also do not attempt to read more packets in this situation. Also do not print a stream open failed message if opening was aborted anyway.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 255e583de2..4f63236d6a 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -302,7 +302,8 @@ struct stream *stream_create(const char *url, int flags,
continue;
}
if (r != STREAM_OK) {
- mp_err(log, "Failed to open %s.\n", url);
+ if (!mp_cancel_test(c))
+ mp_err(log, "Failed to open %s.\n", url);
goto done;
}
}