Skip to content

Commit

Permalink
cdaudio-ng: Reset libcdio when a disk is ejected, forcing it to clear…
Browse files Browse the repository at this point in the history
… any cached disk info.
  • Loading branch information
jlindgren90 committed Mar 10, 2012
1 parent 0d95f5f commit ba714e4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cdaudio-ng/cdaudio-ng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ba714e4

Please sign in to comment.