Mercurial > mplayer.hg
changeset 25045:f795ef502972
Move everything that sets buffer values together.
author | reimar |
---|---|
date | Sat, 17 Nov 2007 18:46:52 +0000 |
parents | 38a6ae2c303d |
children | 6f92f65d00e9 |
files | stream/stream_dvd.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_dvd.c Sat Nov 17 18:40:46 2007 +0000 +++ b/stream/stream_dvd.c Sat Nov 17 18:46:52 2007 +0000 @@ -70,8 +70,6 @@ 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 @@ /* 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);