Mercurial > mplayer.hg
changeset 28181:a02653498c15
Work around a dvdread bug where DVDReadBlocks would return values < 0 on read error,
causing hangs e.g. when seeking to the very last chapter (which would read beyond the
size of the DVD).
author | reimar |
---|---|
date | Wed, 31 Dec 2008 14:21:50 +0000 |
parents | 781ef511a767 |
children | 26ab2d01157f |
files | stream/stream_dvd.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_dvd.c Tue Dec 30 21:39:42 2008 +0000 +++ b/stream/stream_dvd.c Wed Dec 31 14:21:50 2008 +0000 @@ -364,7 +364,8 @@ } len = DVDReadBlocks(d->title, d->cur_pack, 1, data); - if(!len) return -1; //error + // only == 0 should indicate an error, but some dvdread version are buggy when used with dvdcss + if(len <= 0) return -1; //error if(data[38]==0 && data[39]==0 && data[40]==1 && data[41]==0xBF && data[1024]==0 && data[1025]==0 && data[1026]==1 && data[1027]==0xBF) {