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.
This commit is contained in:
wm4 2013-07-07 21:58:48 +02:00
parent 659a314a19
commit 8781e5a55c
1 changed files with 2 additions and 1 deletions

View File

@ -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;