summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-01-24 18:45:24 +0100
committerwm4 <wm4@nowhere>2013-01-24 18:56:02 +0100
commit8a7b8c3dd6ddb58adb221cfd194c57457a40839c (patch)
tree79d2def8f7d175a2d7281ac4c3285b7baedc0f67 /stream/stream.h
parent47cec752915a5aa6780b844247b285f5e96536e9 (diff)
downloadmpv-8a7b8c3dd6ddb58adb221cfd194c57457a40839c.tar.bz2
mpv-8a7b8c3dd6ddb58adb221cfd194c57457a40839c.tar.xz
stream: fix reconnecting on broken network connections
This didn't work properly for HTTP with libavformat. The builtin HTTP implementation reconnects automatically on its own, while libavformat doesn't. Fix this by adding explicit reconnection support to stream_lavf.c, which simply destroys and recreates the AVIO context. It mostly works, though sometimes it mysteriously fails, spamming crap all over the terminal and feeding broken data to the decoders. This is probably due to itneractions with the cache. Also, reconnecting to unseekable HTTP streams will make it read the entire stream until the previous playback position is reached again. It's not known whether this change makes behavior with "strange" protocols like RTP better or worse.
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 4beefc91bd..746667c564 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -101,6 +101,7 @@
#define STREAM_CTRL_GET_CACHE_SIZE 15
#define STREAM_CTRL_GET_CACHE_FILL 16
#define STREAM_CTRL_GET_CACHE_IDLE 17
+#define STREAM_CTRL_RECONNECT 18
struct stream_lang_req {
int type; // STREAM_AUDIO, STREAM_SUB