Commit b5896d48 authored by Rocky Bernstein's avatar Rocky Bernstein
Browse files

Forgot that the lsn internal structure is 0-origin.

Better really would be to remove lsn altogether from cdda_data_t.
parent ca1b3a2c
...@@ -579,10 +579,12 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args ) ...@@ -579,10 +579,12 @@ static int CDDAControl( access_t *p_access, int i_query, va_list args )
for( i = 0; i < p_cdda->i_titles; i++ ) for( i = 0; i < p_cdda->i_titles; i++ )
{ {
if ( p_cdda->p_title[i] ) if ( p_cdda->p_title[i] ) {
(*ppp_title)[i] = (*ppp_title)[i] =
vlc_input_title_Duplicate( p_cdda->p_title[i] ); vlc_input_title_Duplicate( p_cdda->p_title[i] );
} }
}
break; break;
} }
......
...@@ -892,8 +892,9 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda, ...@@ -892,8 +892,9 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
p_cdda->i_titles = 1; p_cdda->i_titles = 1;
p_access->info.i_size = p_access->info.i_size =
(p_cdda->lsn[p_cdda->i_track] (p_cdda->lsn[p_cdda->i_track-1]
- p_cdda->lsn[i_first_track+1]) * (int64_t) CDIO_CD_FRAMESIZE_RAW; - p_cdda->lsn[i_first_track]) * (int64_t) CDIO_CD_FRAMESIZE_RAW;
p_access->info.i_update |= INPUT_UPDATE_TITLE|INPUT_UPDATE_SIZE;
p_item->input.i_duration = p_item->input.i_duration =
(p_cdda->lsn[p_cdda->i_track] (p_cdda->lsn[p_cdda->i_track]
- p_cdda->lsn[i_first_track+1]) / CDIO_CD_FRAMES_PER_SEC; - p_cdda->lsn[i_first_track+1]) / CDIO_CD_FRAMES_PER_SEC;
...@@ -922,11 +923,12 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda, ...@@ -922,11 +923,12 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
} }
p_cdda->i_titles = p_cdda->i_tracks; /* should be +1 */ p_cdda->i_titles = p_cdda->i_tracks; /* should be +1 */
p_access->info.i_size = p_access->info.i_size =
(p_cdda->lsn[i_first_track + p_cdda->i_tracks] (p_cdda->lsn[p_cdda->i_tracks]
- p_cdda->lsn[i_first_track]) * (int64_t) CDIO_CD_FRAMESIZE_RAW; - p_cdda->lsn[0]) * (int64_t) CDIO_CD_FRAMESIZE_RAW;
p_access->info.i_update |= INPUT_UPDATE_TITLE|INPUT_UPDATE_SIZE;
p_item->input.i_duration = p_item->input.i_duration =
(p_cdda->lsn[i_first_track + p_cdda->i_tracks] (p_cdda->lsn[p_cdda->i_tracks]
- p_cdda->lsn[i_first_track]) / CDIO_CD_FRAMES_PER_SEC; - p_cdda->lsn[0]) / CDIO_CD_FRAMES_PER_SEC;
} }
if( b_play ) if( b_play )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment