1
0
Fork 0
forked from len0rd/rockbox

Codecs: mp4: Skip FOURCC filetype chunk check

Instead of FOURCC it needs ignore-case text match. Also value can contain \0 ('m4a\0' instead of expected 'm4a ').But let's simply skip it and let decoder handle it.

Change-Id: I87eefcabbc9010481286257c26cee09e61d1221c
This commit is contained in:
roman.artiukhin 2023-08-31 02:09:40 +03:00 committed by Solomon Peachy
parent fee5013514
commit d05f6aac2d
2 changed files with 8 additions and 32 deletions

View file

@ -56,22 +56,13 @@ typedef struct
/* chunk handlers */
static void read_chunk_ftyp(qtmovie_t *qtmovie, size_t chunk_len)
{
fourcc_t type;
size_t size_remaining = chunk_len - 8;
type = stream_read_uint32(qtmovie->stream);
// filetype (supported ignore case values: m4a, m4b, mp42, 3gp6, qt, isom)
char filetype[4];
stream_read(qtmovie->stream, 4, filetype);
size_remaining-=4;
if ((type != MAKEFOURCC('M','4','A',' ')) &&
(type != MAKEFOURCC('m','4','a',' ')) &&
(type != MAKEFOURCC('M','4','B',' ')) &&
(type != MAKEFOURCC('m','p','4','2')) &&
(type != MAKEFOURCC('3','g','p','6')) &&
(type != MAKEFOURCC('q','t',' ',' ')) &&
(type != MAKEFOURCC('i','s','o','m')))
{
DEBUGF("not M4A file\n");
return;
}
/* minor_ver = */ stream_read_uint32(qtmovie->stream);
size_remaining-=4;