# HG changeset patch # User reimar # Date 1324657635 0 # Node ID a958ea863ee1314e4d9624dec52b1a6f855fdeea # Parent c8437c7512e90b48d4ce762f2ef589d50d0997aa Fix cdda speed default value, range and use more robust condition. Based on patch by Ingo Br«äckl [ib wupperonline de]. diff -r c8437c7512e9 -r a958ea863ee1 stream/stream_cdda.c --- 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);