diff options
Diffstat (limited to 'stream/stream_dvd.c')
-rw-r--r-- | stream/stream_dvd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 029676c112..e6ca1a4a3d 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -70,8 +70,6 @@ static void dvd_set_speed(char *device, unsigned speed) return; case -1: /* restore default value */ if (dvd_speed == 0) return; /* we haven't touched the speed setting */ - speed = 0; - buffer[0] = 4; /* restore default */ mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDrestoreSpeed); break; default: /* limit to <speed> KB/s */ @@ -98,9 +96,13 @@ static void dvd_set_speed(char *device, unsigned speed) /* first sector 0, last sector 0xffffffff */ AV_WB32(buffer + 8, 0xffffffff); + if (speed == -1) + buffer[0] = 4; /* restore default */ + else { /* <speed> kilobyte */ AV_WB32(buffer + 12, speed); AV_WB32(buffer + 20, speed); + } /* 1 second */ AV_WB16(buffer + 18, 1000); |