changeset 32502:9705236ce079

Change code to something understandable (but equivalent).
author reimar
date Sat, 06 Nov 2010 19:33:30 +0000
parents 8352a5ed347a
children 5c4e7dcd8956
files stream/stream_dvd.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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) {