Avoiding to list pairs of the same speed with -list_speeds

This commit is contained in:
Thomas Schmitt 2013-10-29 12:36:09 +00:00
parent 0d3fbf846b
commit 6d896ce5a8
2 changed files with 5 additions and 2 deletions

View File

@ -1601,7 +1601,7 @@ int Xorriso_choose_speed_factor(struct XorrisO *xorriso,
int Xorriso_list_speeds_sub(struct XorrisO *xorriso, int flag)
{
int ret, high= -1, low= 0x7fffffff, is_cd= 0, i, speed;
int recent_profile= 0, inout_flag;
int recent_profile= 0, inout_flag, prev_speed= -1;
char *respt, *speed_unit= "D";
double speed_factor= 1385000.0, cd_factor= 75.0 * 2352;
struct burn_drive_info *dinfo;
@ -1666,6 +1666,9 @@ int Xorriso_list_speeds_sub(struct XorrisO *xorriso, int flag)
sprintf(respt, "Read speed : ");
speed= item->read_speed;
}
if(speed == prev_speed)
continue;
prev_speed= speed;
Xorriso_choose_speed_factor(xorriso, speed,
item->profile_loaded,
&speed_factor, &speed_unit, 0);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2013.10.28.151434"
#define Xorriso_timestamP "2013.10.29.123448"