mirror of
https://github.com/mpv-player/mpv
synced 2025-03-06 06:08:23 +00:00
Some cosmetics in dvd_set_speed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25071 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e0720debf8
commit
be0a2badf7
@ -108,15 +108,17 @@ static void dvd_set_speed(char *device, unsigned speed)
|
||||
AV_WB16(buffer + 18, 1000);
|
||||
AV_WB16(buffer + 26, 1000);
|
||||
|
||||
if ((fd = open(device, O_RDWR | O_NONBLOCK)) == -1) {
|
||||
fd = open(device, O_RDWR | O_NONBLOCK);
|
||||
if (fd == -1) {
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDspeedCantOpen);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ioctl(fd, SG_IO, &sghdr) < 0) {
|
||||
if (ioctl(fd, SG_IO, &sghdr) < 0)
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitFail);
|
||||
} else
|
||||
else
|
||||
mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk);
|
||||
|
||||
close(fd);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user