rockbox/lib/rbcodec/metadata
Solomon Peachy 756c0d2ac8 FS#13299: Simplify VBR frame parsing in the metadata decoder.
The old code would seek forward by the frame length, expecting to see a
frame header there, perform a validity check, and then seek back to the
current header.

Unfortunately this doesn't handle situations where there is extra padding
between the frames, leading us to potentially read garbage, causing the
validity tests to fail and rejecting the file outright.

Instead, keep track of the previous valid header/position, and if we find
"valid" headers in a row return the first after seeking back to it.

This change allows the file referenced in FS13299 to be properly parsed, but
further work is needed to get the file to be playable.  (file reports itself
as layer 1, variable bit rate, variable sample rate!)

Change-Id: I85f61a6360cc041a172db4b7a6b5516e5b60ceee
2021-06-13 12:13:03 -04:00
..
a52.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
aac.c AAC bitstream format files support 2018-12-22 20:12:10 -05:00
adx.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
aiff.c Add support for ID3 tags embedded in AIFF files 2020-07-15 18:30:07 +00:00
ape.c Get APEv2 tag album art format from magic number. Also support bmp artwork. 2020-04-26 13:05:39 -06:00
asap.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
asf.c FS13094: Fix a divide-by-zero crash parsing zero-length WMA/ASF files 2021-05-12 18:22:06 -04:00
au.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
ay.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
flac.c flac: fix warning introduced in 5758a05 2020-08-10 14:32:40 -04:00
gbs.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
hes.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
id3tags.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
kss.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
metadata.c codecs: Add support for the 'VTX' ZX Spectrum chiptunes format. 2020-10-09 11:39:25 -04:00
metadata.h Increase id3v2 max item size on high mem targets 2021-03-22 02:50:51 +00:00
metadata_common.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
metadata_common.h
metadata_parsers.h codecs: Add support for the 'VTX' ZX Spectrum chiptunes format. 2020-10-09 11:39:25 -04:00
mod.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
monkeys.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
mp3.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
mp3data.c FS#13299: Simplify VBR frame parsing in the metadata decoder. 2021-06-13 12:13:03 -04:00
mp3data.h
mp4.c MP4: append mdat sections together in metadata parser 2021-02-19 13:35:41 +00:00
mpc.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
nsf.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
ogg.c Initial opus codec support 2012-09-20 20:47:44 +02:00
oma.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
replaygain.c FS#12966: display '+' for positive replaygain values 2020-07-09 22:18:25 +00:00
replaygain.h
rm.c Realmedia related codecs fixes and enhancements 2018-12-22 20:12:10 -05:00
sgc.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
sid.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
smaf.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
spc.c SPC Codec: Have metadata parser fill in frequency and bitrate. 2013-05-21 20:01:17 -04:00
tta.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
vgm.c VGM Codec: Improve time and fade behavior. Tweak minor misc. 2013-03-06 19:47:05 -05:00
vorbis.c Initial opus codec support 2012-09-20 20:47:44 +02:00
vox.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
vtx.c codecs: Add support for the 'VTX' ZX Spectrum chiptunes format. 2020-10-09 11:39:25 -04:00
wave.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00
wavpack.c Add rbcodecplatform.h and rbcodecconfig.h. 2012-05-03 14:49:35 +02:00