diff options
| author | Dave Chapman <dave@dchapman.com> | 2005-11-02 14:01:27 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2005-11-02 14:01:27 +0000 |
| commit | 53dc1fefe912dcbffafc5d290f7ef79cf2f5bfa4 (patch) | |
| tree | d496fc1f0cec6cfa6c008ddeddb606da8f9e027e /apps/codecs | |
| parent | 744437132e16837bf4928e444ea2ebe6878badf1 (diff) | |
| download | rockbox-53dc1fefe912dcbffafc5d290f7ef79cf2f5bfa4.zip rockbox-53dc1fefe912dcbffafc5d290f7ef79cf2f5bfa4.tar.gz rockbox-53dc1fefe912dcbffafc5d290f7ef79cf2f5bfa4.tar.bz2 rockbox-53dc1fefe912dcbffafc5d290f7ef79cf2f5bfa4.tar.xz | |
Make the m4a parser happier with Nero-encoded .mp4 files. This still needs more work.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7728 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/libm4a/demux.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/codecs/libm4a/demux.c b/apps/codecs/libm4a/demux.c index 4bf60b8..1beeced 100644 --- a/apps/codecs/libm4a/demux.c +++ b/apps/codecs/libm4a/demux.c @@ -59,7 +59,8 @@ static void read_chunk_ftyp(qtmovie_t *qtmovie, size_t chunk_len) type = stream_read_uint32(qtmovie->stream); size_remaining-=4; - if (type != MAKEFOURCC('M','4','A',' ')) + if ((type != MAKEFOURCC('M','4','A',' ')) && + (type != MAKEFOURCC('m','p','4','2'))) { DEBUGF("not M4A file\n"); return; @@ -485,7 +486,7 @@ static bool read_chunk_stbl(qtmovie_t *qtmovie, size_t chunk_len) default: DEBUGF("(stbl) unknown chunk id: %c%c%c%c\n", SPLITFOURCC(sub_chunk_id)); - return false; + stream_skip(qtmovie->stream, sub_chunk_len - 8); /* FIXME not 8 */ } size_remaining -= sub_chunk_len; @@ -497,12 +498,14 @@ static bool read_chunk_minf(qtmovie_t *qtmovie, size_t chunk_len) { size_t dinf_size, stbl_size; size_t size_remaining = chunk_len - 8; /* FIXME WRONG */ + uint32_t i; /**** SOUND HEADER CHUNK ****/ - if (stream_read_uint32(qtmovie->stream) != 16) + if ((i=stream_read_uint32(qtmovie->stream)) != 16) { - DEBUGF("unexpected size in media info\n"); - return false; + DEBUGF("unexpected size in media info: %d\n",i); + stream_skip(qtmovie->stream, size_remaining-4); + return true; } if (stream_read_uint32(qtmovie->stream) != MAKEFOURCC('s','m','h','d')) { @@ -582,6 +585,7 @@ static bool read_chunk_mdia(qtmovie_t *qtmovie, size_t chunk_len) default: DEBUGF("(mdia) unknown chunk id: %c%c%c%c\n", SPLITFOURCC(sub_chunk_id)); + stream_skip(qtmovie->stream, sub_chunk_len - 8); return false; } @@ -684,7 +688,7 @@ static bool read_chunk_moov(qtmovie_t *qtmovie, size_t chunk_len) default: DEBUGF("(moov) unknown chunk id: %c%c%c%c\n", SPLITFOURCC(sub_chunk_id)); - return false; + stream_skip(qtmovie->stream, sub_chunk_len - 8); /* FIXME not 8 */ } size_remaining -= sub_chunk_len; |