summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-07 14:49:41 +0100
committerwm4 <wm4@nowhere>2019-11-07 22:53:13 +0100
commit53f17a71f4bd33fdc2fc08b72138f477e8e02639 (patch)
tree3ad9462352db09cb3256fd911896279cbc6ef8be
parent12d17610645c1d1c2d5bd92cd66a604bb2c754dd (diff)
downloadmpv-53f17a71f4bd33fdc2fc08b72138f477e8e02639.tar.bz2
mpv-53f17a71f4bd33fdc2fc08b72138f477e8e02639.tar.xz
stream: fix typos in a comments
-rw-r--r--stream/stream.c2
-rw-r--r--stream/stream.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 136050c265..fdaecf9ec8 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -203,7 +203,7 @@ static const char *match_proto(const char *url, const char *proto)
}
// Read len bytes from the start position, and wrap around as needed. Limit the
-// a actually read data to the size of the buffer. Return amount of copied bytes.
+// actually read data to the size of the buffer. Return amount of copied bytes.
// len: max bytes to copy to dst
// pos: index into s->buffer[], e.g. s->buf_start is byte 0
// returns: bytes copied to dst (limited by len and available buffered data)
diff --git a/stream/stream.h b/stream/stream.h
index cc7fcbb2f0..61c5e12303 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -152,7 +152,7 @@ typedef struct stream {
// This is a ring buffer. It is reset only on seeks (or when buffers are
// dropped). Otherwise old contents always stay valid.
// The valid buffer is from buf_start to buf_end; buf_end can be larger
- // then the buffer size (requires wrap around). buf_cur is a value in the
+ // than the buffer size (requires wrap around). buf_cur is a value in the
// range [buf_start, buf_end].
// When reading more data from the stream, buf_start is advanced as old
// data is overwritten with new data.
@@ -164,7 +164,7 @@ typedef struct stream {
// ^ buf_start (4) | |
// | ^ buf_end (12 % 8 => 4)
// ^ buf_cur (9 % 8 => 1)
- // Here, the entire 8 byte buffer is filled, i.e. buf_end - buf_start = 8.
+ // Here, the entire 8 byte buffer is filled, i.e. buf_end - buf_start = 8.
// buffer_mask == 7, so (x & buffer_mask) == (x % buffer_size)
unsigned int buf_start; // index of oldest byte in buffer (is <= buffer_mask)
unsigned int buf_cur; // current read pos (can be > buffer_mask)
@@ -174,7 +174,7 @@ typedef struct stream {
uint8_t *buffer;
} stream_t;
-// Non-inline version with stream_read_char().
+// Non-inline version of stream_read_char().
int stream_read_char_fallback(stream_t *s);
int stream_write_buffer(stream_t *s, unsigned char *buf, int len);