mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
stream: minor cleanups
Fix return types and return values to make them more consistent. Some reformatting and making code more concise. In stream_reconnect(), avoid the additional mp_cancel_test() call by moving the "connection lost" message below the mp_cancel_wait() call, which effectively leads to the same behavior when the stream was already canceled. (The goal is not to show the message in this case.) Merge stream_seek_long() into stream_seek(). It was the only caller. Always clear the eof flag on seeks. Reduce access to stream internals in cache.c and stream_lavf.c.
This commit is contained in:
@@ -581,9 +581,8 @@ static int cache_control(stream_t *cache, int cmd, void *arg)
|
||||
}
|
||||
r = s->control_res;
|
||||
if (s->control_flush) {
|
||||
stream_drop_buffers(cache);
|
||||
cache->pos = s->read_filepos;
|
||||
cache->eof = 0;
|
||||
cache->buf_pos = cache->buf_len = 0;
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
Reference in New Issue
Block a user