mirror of https://github.com/mpv-player/mpv
stream_dvd: fill_buffer(): use given buffer, not stream's default
Fix dvd:// fill_buffer function to actually write into the specified buffer and check that the buffer is sufficiently large. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32591 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32592 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
040008b43f
commit
15259f1aad
|
@ -374,9 +374,12 @@ static void dvd_close(dvd_priv_t *d)
|
|||
dvd_set_speed(dvd_device_current, -1); /* -1 => restore default */
|
||||
}
|
||||
|
||||
static int fill_buffer(stream_t *s, char *but, int len)
|
||||
static int fill_buffer(stream_t *s, char *buf, int len)
|
||||
{
|
||||
off_t pos=dvd_read_sector(s->priv,s->buffer);
|
||||
off_t pos;
|
||||
if (len < 2048)
|
||||
return -1;
|
||||
pos = dvd_read_sector(s->priv, buf);
|
||||
if (pos < 0)
|
||||
return -1;
|
||||
s->pos = 2048*(pos - 1);
|
||||
|
|
Loading…
Reference in New Issue