Codecs: mp3: Move strip tags to codec

Another fix for FS#13626 (replacement for 2bd88936f7)

Change-Id: Ife5f65539457559fd908d0048d4df94649b0b894
This commit is contained in:
Roman Artiukhin 2025-05-22 15:26:54 +03:00 committed by Solomon Peachy
parent 78903e9d38
commit 38105860dc
6 changed files with 24 additions and 0 deletions

View file

@ -152,6 +152,7 @@ struct codec_api {
long (*get_command)(intptr_t *param);
/* Determine whether the track should be looped, if applicable. */
bool (*loop_track)(void);
void (*strip_filesize)(off_t value);
/* kernel/ system */
#if defined(ARM_NEED_DIV0)

View file

@ -448,6 +448,11 @@ enum codec_status codec_run(void)
ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency);
current_frequency = ci->id3->frequency;
codec_set_replaygain(ci->id3);
if (!ci->id3->is_asf_stream)
{
// End of file might contain ID3v1 or APE tags. Strip them from decoding
ci->strip_filesize(ci->id3->first_frame_offset + ci->id3->filesize);
}
if (ci->id3->offset) {