changeset 25042:e764cbed0175

Move the DVD speed factor -> KB/s conversion into the case branch where it is actually used
author reimar
date Sat, 17 Nov 2007 18:31:26 +0000
parents 985bb0dc612e
children e1dbd43b753d
files stream/stream_dvd.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvd.c	Sat Nov 17 18:27:17 2007 +0000
+++ b/stream/stream_dvd.c	Sat Nov 17 18:31:26 2007 +0000
@@ -65,10 +65,6 @@
 
   if (!S_ISBLK(st.st_mode)) return; /* not a block device */
 
-  if (speed < 100) { /* speed times 1350KB/s (DVD single speed) */
-    speed *= 1350;
-  }
-
   switch (speed) {
   case 0: /* don't touch speed setting */
     return;
@@ -79,6 +75,9 @@
     mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDrestoreSpeed);
     break;
   default: /* limit to <speed> KB/s */
+    // speed < 100 is multiple of DVD single speed (1350KB/s)
+    if (speed < 100)
+      speed *= 1350;
     mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitSpeed, speed);
     break;
   }