diff options
author | wm4 <wm4@nowhere> | 2018-01-04 15:20:19 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-04 18:33:18 -0800 |
commit | 185e63a3e2a84fe4d006054960481460072a8243 (patch) | |
tree | a320b4df574926e0254749a445006e9d9b798e65 /stream/stream.h | |
parent | cf411a9489b825f5b5587414431a694dc743da82 (diff) | |
download | mpv-185e63a3e2a84fe4d006054960481460072a8243.tar.bz2 mpv-185e63a3e2a84fe4d006054960481460072a8243.tar.xz |
stream: use native libavformat reconnection feature
Remove our own hacky reconnection code, and use libavformat's feature for
that. It's disabled by default, and until recently it did not work too
well. This has been fixed in recent ffmpeg git master[1], so there's no reason
to keep our own code.
[1] FFmpeg/FFmpeg@8a108bdea06fac43af9f44b6d2538f357451167a
We set "reconnect_delay_max" to 7, which limits the maximum time it
waits. Since libavformat doubles the wait time on each reconnect attempt
(starting with 1), and stops trying to reconnect once the wait time is
over the reconnect_delay_max value, this allows for 4 reconnection
attempts which should add to 11 seconds maximum wait time. The default
is 120, which seems too high for normal playback use.
(The user can still override these parameters with --stream-lavf-o.)
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/stream/stream.h b/stream/stream.h index ba2b0ca2af..3ce74ecd15 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -64,7 +64,6 @@ enum stream_ctrl { STREAM_CTRL_GET_BASE_FILENAME, // Certain network protocols - STREAM_CTRL_RECONNECT, STREAM_CTRL_AVSEEK, STREAM_CTRL_HAS_AVSEEK, STREAM_CTRL_GET_METADATA, |