mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
Fix track info being read for the wrong track introduced in r20598
Patch by kiriuja (mplayer-patches <at> en-directo net) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23287 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
49d90f4d53
commit
0cb679cfa6
@ -103,7 +103,7 @@ read_toc(const char *dev) {
|
||||
}
|
||||
for (i = first; i <= last; i++) {
|
||||
struct cdrom_tocentry tocentry;
|
||||
tocentry.cdte_track = (i == last) ? 0xAA : i;
|
||||
tocentry.cdte_track = (i == last) ? 0xAA : i + 1;
|
||||
tocentry.cdte_format = CDROM_MSF;
|
||||
ioctl(drive, CDROMREADTOCENTRY, &tocentry);
|
||||
cdtoc[i].min = tocentry.cdte_addr.msf.minute;
|
||||
@ -118,7 +118,7 @@ read_toc(const char *dev) {
|
||||
}
|
||||
for (i = first; i <= last; i++) {
|
||||
struct ioc_read_toc_single_entry tocentry;
|
||||
tocentry.track = (i == last) ? 0xAA : i;
|
||||
tocentry.track = (i == last) ? 0xAA : i + 1;
|
||||
tocentry.address_format = CD_MSF_FORMAT;
|
||||
ioctl(drive, CDIOREADTOCENTRY, &tocentry);
|
||||
cdtoc[i].min = tocentry.entry.addr.msf.minute;
|
||||
@ -134,7 +134,7 @@ read_toc(const char *dev) {
|
||||
for (i = first; i <= last; i++) {
|
||||
struct ioc_read_toc_entry tocentry;
|
||||
struct cd_toc_entry toc_buffer;
|
||||
tocentry.starting_track = (i == last) ? 0xAA : i;
|
||||
tocentry.starting_track = (i == last) ? 0xAA : i + 1;
|
||||
tocentry.address_format = CD_MSF_FORMAT;
|
||||
tocentry.data = &toc_buffer;
|
||||
tocentry.data_len = sizeof(toc_buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user