[MPlayer-cvslog] r25073 - trunk/stream/stream_dvd.c

reimar subversion at mplayerhq.hu
Sat Nov 17 19:46:52 CET 2007


Author: reimar
Date: Sat Nov 17 19:46:52 2007
New Revision: 25073

Log:
Move everything that sets buffer values together.


Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	(original)
+++ trunk/stream/stream_dvd.c	Sat Nov 17 19:46:52 2007
@@ -70,8 +70,6 @@ static void dvd_set_speed(char *device, 
     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, 
   /* 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);



More information about the MPlayer-cvslog mailing list