# HG changeset patch # User reimar # Date 1289072010 0 # Node ID 9705236ce07957352fcff7bf18b3ee96583e0d84 # Parent 8352a5ed347ac42c61bf89ed284ec67de13b2afe Change code to something understandable (but equivalent). diff -r 8352a5ed347a -r 9705236ce079 stream/stream_dvd.c --- a/stream/stream_dvd.c Sat Nov 06 19:30:48 2010 +0000 +++ b/stream/stream_dvd.c Sat Nov 06 19:33:30 2010 +0000 @@ -416,11 +416,9 @@ static int fill_buffer(stream_t *s, char *but, int len) { off_t pos=dvd_read_sector(s->priv,s->buffer); - if(pos>=0) { - len=2048; // full sector - s->pos=2048*pos-len; - } else len=-1; // error - return len; + if (pos < 0) + s->pos = 2048*(pos - 1); + return 2048; // full sector } static int seek(stream_t *s, off_t newpos) {