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/cache.c | |
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/cache.c')
-rw-r--r-- | stream/cache.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/stream/cache.c b/stream/cache.c index d91ae73b05..10e1bd7ce7 100644 --- a/stream/cache.c +++ b/stream/cache.c @@ -504,7 +504,6 @@ static bool control_needs_flush(int stream_ctrl) case STREAM_CTRL_AVSEEK: case STREAM_CTRL_SET_ANGLE: case STREAM_CTRL_SET_CURRENT_TITLE: - case STREAM_CTRL_RECONNECT: case STREAM_CTRL_DVB_SET_CHANNEL: case STREAM_CTRL_DVB_SET_CHANNEL_NAME: case STREAM_CTRL_DVB_STEP_CHANNEL: |