diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-17 18:35:36 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-17 18:35:36 +0000 |
commit | be0a2badf776b611a352865c0e77ade706a90273 (patch) | |
tree | 2d3bfa92f1f97a2c4e375679398eb054261ce712 /stream/stream_dvd.c | |
parent | e0720debf8b81a6d074c6d8e6a8dce179d3da95d (diff) | |
download | mpv-be0a2badf776b611a352865c0e77ade706a90273.tar.bz2 mpv-be0a2badf776b611a352865c0e77ade706a90273.tar.xz |
Some cosmetics in dvd_set_speed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25071 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r-- | stream/stream_dvd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 98984c55a1..f4212dd4dc 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -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 - mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk); + else + mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk); + close(fd); #endif } |