mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-11 09:32:46 +02:00
2015-03-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/rdcdplayer.cpp' that threw a segfault when opening the ripper with no CD inserted under RHEL 7.
This commit is contained in:
parent
da8cf74df8
commit
5e20febe5b
@ -14834,3 +14834,6 @@
|
||||
* Added a 'Capability::HaveMp4Decode' value to the
|
||||
'RDStation::Capability' enumeration in 'lib/rdstation.cpp' and
|
||||
'lib/rdstation.h'.
|
||||
2015-03-10 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'lib/rdcdplayer.cpp' that threw a segfault
|
||||
when opening the ripper with no CD inserted under RHEL 7.
|
||||
|
@ -201,13 +201,15 @@ int RDCdPlayer::rightVolume()
|
||||
|
||||
void RDCdPlayer::setCddbRecord(RDCddbRecord *rec)
|
||||
{
|
||||
rec->setTracks(cdrom_track_count);
|
||||
rec->setDiscId(cdrom_disc_id);
|
||||
rec->setDiscLength(75*(60*cdrom_track_start[cdrom_track_count].msf.minute+
|
||||
cdrom_track_start[cdrom_track_count].msf.second)+
|
||||
cdrom_track_start[cdrom_track_count].msf.frame);
|
||||
for(int i=0;i<cdrom_track_count;i++) {
|
||||
rec->setTrackOffset(i,trackOffset(i));
|
||||
if(cdrom_track_count>0) {
|
||||
rec->setTracks(cdrom_track_count);
|
||||
rec->setDiscId(cdrom_disc_id);
|
||||
rec->setDiscLength(75*(60*cdrom_track_start[cdrom_track_count].msf.minute+
|
||||
cdrom_track_start[cdrom_track_count].msf.second)+
|
||||
cdrom_track_start[cdrom_track_count].msf.frame);
|
||||
for(int i=0;i<cdrom_track_count;i++) {
|
||||
rec->setTrackOffset(i,trackOffset(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -460,6 +462,7 @@ void RDCdPlayer::ReadToc()
|
||||
//
|
||||
if(ioctl(cdrom_fd,CDROMREADTOCHDR,&tochdr)<0) {
|
||||
cdrom_track_count=0;
|
||||
return;
|
||||
}
|
||||
cdrom_track_count=tochdr.cdth_trk1-tochdr.cdth_trk0+1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user