1
0
Fork 0
forked from len0rd/rockbox
foxbox/lib/rbcodec
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
..
codecs Sync opus codec to upstream git 2021-04-23 14:23:04 +00:00
dsp FS#13267: Fix crash when enabling Perceptual Bass Enhancment during playback 2021-03-01 19:02:22 +00:00
metadata FS#13299: Simplify VBR frame parsing in the metadata decoder. 2021-06-13 12:13:03 -04:00
test Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
platform.h Enable buflib and core_alloc for warble. 2015-01-19 21:30:03 +01:00
rbcodec.make [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
rbcodecconfig-example.h Enable setting of global output samplerate on certain targets. 2013-07-06 04:22:04 +02:00
rbcodecplatform-unix.h Enable buflib and core_alloc for warble. 2015-01-19 21:30:03 +01:00
SOURCES codecs: Add support for the 'VTX' ZX Spectrum chiptunes format. 2020-10-09 11:39:25 -04:00