diff options
author | Memphiz <memphis@machzwo.de> | 2014-11-25 18:08:42 +0100 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2014-11-25 19:14:07 +0100 |
commit | d70f9cb09b1ecd1ad8fffeb2e8cc809bec83225b (patch) | |
tree | 0ec1ad8d91f71e16bec75bd2fcd2c598aef67e6b /lib | |
parent | 4465fbfa715d02dd6ebbfa1b90fa315a6b75a7d2 (diff) |
[libdvdread] - fix partial reads in file_read - fixes iso playback on ios (which doesn't use libdvdcss and therefore hits this bug)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libdvd/libdvdread/src/dvd_input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libdvd/libdvdread/src/dvd_input.c b/lib/libdvd/libdvdread/src/dvd_input.c index 4a0252431a..7efff01acf 100644 --- a/lib/libdvd/libdvdread/src/dvd_input.c +++ b/lib/libdvd/libdvdread/src/dvd_input.c @@ -217,12 +217,14 @@ static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags) { size_t len; ssize_t ret; + char *buf; + buf = (char*) buffer; len = (size_t)blocks * DVD_VIDEO_LB_LEN; while(len > 0) { - ret = read(dev->fd, buffer, len); + ret = read(dev->fd, buf, len); if(ret < 0) { /* One of the reads failed, too bad. We won't even bother @@ -241,6 +243,7 @@ static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags) return (int) (bytes / DVD_VIDEO_LB_LEN); } + buf += ret; len -= ret; } |