Skip to content
Permalink
Browse files

cdaudio-ng: Reset libcdio when a disk is ejected, forcing it to clear…

… any cached disk info.
  • Loading branch information
jlindgren90 committed Mar 10, 2012
1 parent 0d95f5f commit ba714e41d823871995c165521e8456c061ac61f8
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/cdaudio-ng/cdaudio-ng.c
@@ -926,6 +926,13 @@ static void refresh_trackinfo (gboolean warning)
cdaudio_error (_("Unsupported disk type."));
}

/* reset libcdio, else it will not read a new disk correctly */
if (pcdrom_drive)
{
cdda_close (pcdrom_drive);
pcdrom_drive = NULL;
}

g_free (trackinfo);
trackinfo = NULL;
return;

0 comments on commit ba714e4

Please sign in to comment.
You can’t perform that action at this time.