From 040008b43f9f4ca756e05e5c2df6c7cac6ac2519 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 6 Nov 2010 19:30:48 +0000 Subject: stream_dvd: minor cleanup Remove a pointless and stupid condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32588 b3059339-0415-0410-9bf9-f77b7e298cf2 Change code to something understandable (but equivalent). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32589 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, add missing return. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32590 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvd.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'stream/stream_dvd.c') diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 8ccba47493..bff5011e90 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -376,14 +376,11 @@ static void dvd_close(dvd_priv_t *d) static int fill_buffer(stream_t *s, char *but, int len) { - if(s->type == STREAMTYPE_DVD) { 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) + return -1; + s->pos = 2048*(pos - 1); + return 2048; // full sector } static int seek(stream_t *s, off_t newpos) { -- cgit v1.2.3