From fc1efc7b13674a6d3a6b21f634a1038197775a75 Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Tue, 30 Jan 2007 21:42:36 +0000 Subject: Fix a couple of MP4 demuxing problems, preventing playback in a few cases. All my test files now play properly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12161 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libm4a/demux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/codecs/libm4a/demux.c') diff --git a/apps/codecs/libm4a/demux.c b/apps/codecs/libm4a/demux.c index 34bc07556b..10972f8b1f 100644 --- a/apps/codecs/libm4a/demux.c +++ b/apps/codecs/libm4a/demux.c @@ -762,7 +762,11 @@ int qtmovie_read(stream_t *file, demux_res_t *demux_res) read_chunk_mdat(&qtmovie, chunk_len); /* Keep track of start of stream in file - used for seeking */ qtmovie.res->mdat_offset=stream_tell(qtmovie.stream); - return 1; + /* There can be empty mdats before the real one. If so, skip them */ + if (qtmovie.res->mdat_len > 0) { + return 1; + } + break; /* these following atoms can be skipped !!!! */ case MAKEFOURCC('f','r','e','e'): -- cgit v1.2.3