Gustavo De Nardin via Vincent Danen. Originally for libcdio 0.78.2 See also https://savannah.gnu.org/patch/?6413