summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvd.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-11-06 19:30:48 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 18:05:11 +0200
commit040008b43f9f4ca756e05e5c2df6c7cac6ac2519 (patch)
tree6c924507c3b64c73743f9b03e2cbd3d0d0b65cdc /stream/stream_dvd.c
parent47ba682a636e3741530ebe956bbd6a508aa56a83 (diff)
downloadmpv-040008b43f9f4ca756e05e5c2df6c7cac6ac2519.tar.bz2
mpv-040008b43f9f4ca756e05e5c2df6c7cac6ac2519.tar.xz
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
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r--stream/stream_dvd.c11
1 files changed, 4 insertions, 7 deletions
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) {