mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
47ba682a63
commit
040008b43f
|
@ -376,14 +376,11 @@ static void dvd_close(dvd_priv_t *d)
|
||||||
|
|
||||||
static int fill_buffer(stream_t *s, char *but, int len)
|
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);
|
off_t pos=dvd_read_sector(s->priv,s->buffer);
|
||||||
if(pos>=0) {
|
if (pos < 0)
|
||||||
len=2048; // full sector
|
return -1;
|
||||||
s->pos=2048*pos-len;
|
s->pos = 2048*(pos - 1);
|
||||||
} else len=-1; // error
|
return 2048; // full sector
|
||||||
}
|
|
||||||
return len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int seek(stream_t *s, off_t newpos) {
|
static int seek(stream_t *s, off_t newpos) {
|
||||||
|
|
Loading…
Reference in New Issue