rockbox/lib/rbcodec/metadata
Michael Giacomelli 8194d51c49 a52: play files that do not start with a frame
A52 files cut from a longer stream can start partway through a frame.
The metadata parser required a sync word at offset 0 and rejected
them, although the codec can resync.  Scan the first 64 KB for a frame
header that is followed by a second valid header, record it as
first_frame_offset, and use that offset when seeking and resuming.

Tested in the simulator (perfsim) and on a Sansa Clip+: a file
starting with 675 bytes of a partial frame now plays.  In the
simulator it decodes all 3161 frames with the same output as the file
without those bytes, and seeks land on frame starts.

Fixes FS#9056

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I5d72b1cd1d8437491ec00a38459e391fb158b9a2
2026-10-09 11:09:42 -04:00
..
a52.c a52: play files that do not start with a frame 2026-10-09 11:09:42 -04:00
aac.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
adx.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
aiff.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
ape.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
asap.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
asf.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
au.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
ay.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
flac.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
gbs.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
hes.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
id3tags.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
kss.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
metadata.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
metadata.h metadata.c small cleanup 2026-06-28 14:24:02 -04:00
metadata_common.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
metadata_common.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
metadata_parsers.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mod.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
monkeys.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
mp3.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
mp3data.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
mp3data.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mp4.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
mpc.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
nsf.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
ogg.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
oma.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
replaygain.c metadata: read R128 gain tags in Opus files 2026-10-08 23:01:48 -04:00
replaygain.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
rm.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
sgc.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
sid.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
smaf.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
spc.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
tta.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
vgm.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
vorbis.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
vox.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
vtx.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
wave.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
wavpack.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00