[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#466920: cdcd: segfaults with 'rndplay' if no disc in drive



Hi,

The patch joint solve the problem: rndplay will perform the same check
as for the play command.

Unfortunally I can't hear any sound while playing a CD with cdcd (either
with play or rndplay) but 'status' says the CD is well read.

Manu
--- cmd_cdcd.c	2011-06-26 15:03:10.000000000 +0200
+++ cmd_cdcd.c_new	2011-06-26 15:04:56.000000000 +0200
@@ -614,8 +614,8 @@
 {
   struct disc_info disc;
   NOARG;
-  if (cd_stat (cd_desc, &disc) != 0)
-    return XRET_NULL;
+  if (cdcd_cd_stat (cd_desc, &disc) < 0)
+    return 0;
 
   play_track = (rand () % disc.disc_total_tracks) + 1;
 

Reply to: