diff options
author | wm4 <wm4@nowhere> | 2013-07-07 21:58:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-07 21:58:48 +0200 |
commit | 8781e5a55c5f250e7c637a4cc9c4d8f91b227314 (patch) | |
tree | fa7d4998a3b347cbb60583ec1e6be7abe081d3b3 /stream | |
parent | 659a314a19c12f5efeab46caca7a306c3330d85c (diff) | |
download | mpv-8781e5a55c5f250e7c637a4cc9c4d8f91b227314.tar.bz2 mpv-8781e5a55c5f250e7c637a4cc9c4d8f91b227314.tar.xz |
stream: unbreak streams with large sector sizes (stream_cdda)
Commit 7b16d4b changed some stream implementations to check the buffer
size passed to them. This made stream_cdda stop working, because the
default buffer size is smaller than the CDIO frame size. So pass the
sector size instead of the (arbitrary) default buffer size.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c index b2de1221b8..3dc25d7880 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -375,7 +375,8 @@ eof_out: int stream_fill_buffer(stream_t *s) { - int len = stream_read_unbuffered(s, s->buffer, STREAM_BUFFER_SIZE); + int len = s->sector_size ? s->sector_size : STREAM_BUFFER_SIZE; + len = stream_read_unbuffered(s, s->buffer, len); s->buf_pos = 0; s->buf_len = len; return s->buf_len; |