diff options
author | wm4 <wm4@nowhere> | 2015-02-06 21:15:21 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-06 21:43:52 +0100 |
commit | 347cf972310c0de5565015190c1cd6e7d3d3d30c (patch) | |
tree | 4aca713ceb59df5e3c25bcf072b6933149ebb9a0 /stream/stream.h | |
parent | 45e214d7ae7f1a8cf7af6b43968083b53b25ccb2 (diff) | |
download | mpv-347cf972310c0de5565015190c1cd6e7d3d3d30c.tar.bz2 mpv-347cf972310c0de5565015190c1cd6e7d3d3d30c.tar.xz |
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.
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream.h b/stream/stream.h index ef9f402c72..1dd00edb91 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -252,8 +252,8 @@ inline static int64_t stream_tell(stream_t *s) return s->pos + s->buf_pos - s->buf_len; } -int stream_skip(stream_t *s, int64_t len); -int stream_seek(stream_t *s, int64_t pos); +bool stream_skip(stream_t *s, int64_t len); +bool stream_seek(stream_t *s, int64_t pos); int stream_read(stream_t *s, char *mem, int total); int stream_read_partial(stream_t *s, char *buf, int buf_size); struct bstr stream_peek(stream_t *s, int len); |