changeset 34370:a958ea863ee1

Fix cdda speed default value, range and use more robust condition. Based on patch by Ingo Br«äckl [ib wupperonline de].
author reimar
date Fri, 23 Dec 2011 16:27:15 +0000
parents c8437c7512e9
children a4dd7151526b
files stream/stream_cdda.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_cdda.c	Fri Dec 23 14:45:35 2011 +0000
+++ b/stream/stream_cdda.c	Fri Dec 23 16:27:15 2011 +0000
@@ -70,7 +70,7 @@
   char* device;
   m_span_t span;
 } cdda_dflts = {
-  -1,
+  0,
   0,
   NULL,
   0,
@@ -84,7 +84,7 @@
 
 #define ST_OFF(f) M_ST_OFF(struct cdda_params,f)
 static const m_option_t cdda_params_fields[] = {
-  { "speed", ST_OFF(speed), CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL },
+  { "speed", ST_OFF(speed), CONF_TYPE_INT, M_OPT_RANGE,0,100, NULL },
   { "paranoia", ST_OFF(paranoia_mode), CONF_TYPE_INT,M_OPT_RANGE, 0, 2, NULL },
   { "generic-dev", ST_OFF(generic_dev), CONF_TYPE_STRING, 0, 0, 0, NULL },
   { "sector-size", ST_OFF(sector_size), CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL },
@@ -382,7 +382,7 @@
       cdd->disc_toc[i].dwStartSector += offset;
   }
 
-  if(p->speed)
+  if(p->speed > 0)
     cdda_speed_set(cdd,p->speed);
 
   last_track = cdda_tracks(cdd);