Should make debugging crashes on native MIPS targets far easier.
This is by no means a 100% complete or robust implementation but
it seems to handle the vast majority of functions.
Change-Id: Id5f430270e02b5092b79026b6876675c784aa649
Seeking doesn't work well in M4A files with very few chunks due to
the seek method used (chunk based using the info in the 'stco' atom).
According to libm4a/demux.c the expected seek resolution using this
method is 1/4 to 1/2 seconds. However, ffmpeg generates files with a
1 megabyte chunk size, so the resolution is much worse than expected
on some files: around 30-40 seconds at 256kbps.
There was a bug with the seek position reported back to Rockbox: the
codec pretended it could seek exactly to the requested sample, but it
would only seek to the start of a chunk. This could leave the UI in a
confusing state because the real playback position was different from
what the elapsed time showed. Fix this by recalculating the reported
sample position using the chunk start.
To fix the low seek accuracy, use the table in the 'stsz' atom to skip
individual packets within a chunk. This is very accurate, but it takes
a lot of RAM to allocate the table. Currently the table is not allowed
to use more than half of the codec RAM, which should suffice for short
files on most targets. On files where the table is too large the codec
will fall back to the less accurate chunk-based seek method.
Change-Id: Ide38ea846c1cdd69691e9b1e1cd87eb0fa11cf78
UBSan reports an avalanche of unaligned pointer bugs stemming from
hardcoded 4-byte alignments used in certain places. Use sizeof(long)
instead to align to the machine word size.
Change-Id: I28e505212462c5268afa24e95df3a103ac3e2213
These operations can only be used in limited circumstances and have
exactly one user. bufgettail especially seems of dubious value; how
often do you need to read N bytes from the end of a file without
changing the file position?
strip_tags() was the only function using them, to strip off ID3v1
and APE tags off the end of buffered tracks. This would save only
32-192 bytes per track -- if the container format uses APE/ID3v1.
It hardly seems worth the effort.
Change-Id: I8fc3c1408517eda6126e75e76d76daea904b50eb
Left shifts are not defined in C if they would cause signed overflow,
so these expressions get instrumented, which makes them unusable as
switch values and triggers compile errors when compiling with UBSan.
Change-Id: I0588d4be1e00ba1cfde0eac119ead368b20d10c9
decrease size hit of initializing asf by using a union
remove init from bytes LE conversion in metadata common
-- bad idea for performance
Change-Id: I4514adc125e5da2b99d9f913ba74afd5f1345822
fix bugs introduced in the switch over to using string_option
instead of if else strcmp trees,
embedded album art should work again
skin parser had an error for 'noborder' and 'nobar'
Change-Id: I957d81e5fa8467b33bbd93d63c4428c36100acca
There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.
Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.
Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
This overflow is impossible to trigger due to the simple
relationship between binary and hexadecimal numbers.
Change-Id: Ie8243129967abb935a77152a808765318052c979
Instead of using isgraph(), check for legal FAT32 characters
excluding spaces (which are used as field separators).
Change-Id: I291f0acb5f24c558099c237d913f4f35ae06b834
- Only treat EOF as newline if the line is non-empty to
suppress a useless empty line after the end of a file.
- Deal with 0- and 1-byte line buffers safely.
- Remove whitespace stripping and comment handling which
was left over from refactoring. Move it to xf_map_parse()
where it belongs.
Change-Id: I9f05f4e18ca6dd011ca4cd231f0b5ea37c784778
Pass COVERAGE=1 to enable clang-based code coverage and pass
SANITIZE=1 to enable sanitizers. 'make cov' will run the test
app and show a coverage summary.
Change-Id: I8a33e8b78665165d8da1818dc01f495f0c52cf06
This is a new flash installer framework for the X1000 targets.
A bunch of this code is *UNTESTED* but there is an external test
harness which allows the library to be built and tested on a PC.
Once tests are written and the bugs are ironed out this framework
will replace the existing installer code.
New features:
- Update tarballs are MD5-checksummed to guarantee integrity.
- The flash map is no longer fixed -- updates are self describing and
carry a map file which specifies the areas to update.
- Can take full or partial backups with checksums computed on the fly.
- Supports an additional verification mode which reads back data after
writing to ensure the flash contents were not silently corrupted.
Change-Id: I29a89190c7ff566019f6a844ad0571f01fb7192f
This is a major overhaul of the library with some API
changes and ease of use improvements, particularly for
creating new archives.
The updated functionality is intended to support a new
X1000 installer framework.
Change-Id: Icf192bb546831231d49303fbf529ef1c1ce8905c
didn't set the genre string to null on case entry
means read failure would leave genre string indeterminate
add explicit NULL & leave genre uninitialized
Change-Id: I1452a0b57985646c982ec80755d0df9d03745f1e
* direct use of memcpy() instead of ci->memcpy() in flac and mod
* uninitialized variable in mpegplayer
Change-Id: I2d08682d5f66c319780e69e3ff63d600c61d8f5a