summaryrefslogtreecommitdiff
path: root/apps/codecs/libm4a
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2010-01-02 21:02:13 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2010-01-02 21:02:13 +0000
commitce8640d7b8bf62c0b42823ff76c4387507353dae (patch)
tree1d53b22b0ae2d53b526196b4b8092f73a43e7095 /apps/codecs/libm4a
parent008c368c87873615ccbe8bc0b3482d93ae15779d (diff)
downloadrockbox-ce8640d7b8bf62c0b42823ff76c4387507353dae.zip
rockbox-ce8640d7b8bf62c0b42823ff76c4387507353dae.tar.gz
rockbox-ce8640d7b8bf62c0b42823ff76c4387507353dae.tar.bz2
rockbox-ce8640d7b8bf62c0b42823ff76c4387507353dae.tar.xz
Second part of FS#10832 by Juliusz Chroboczek. Ignore empty mdat chunks in mp4 files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24148 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libm4a')
-rw-r--r--apps/codecs/libm4a/demux.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/codecs/libm4a/demux.c b/apps/codecs/libm4a/demux.c
index 9f887b6..8c7189e 100644
--- a/apps/codecs/libm4a/demux.c
+++ b/apps/codecs/libm4a/demux.c
@@ -771,12 +771,11 @@ int qtmovie_read(stream_t *file, demux_res_t *demux_res)
}
break;
case MAKEFOURCC('m','d','a','t'):
- 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);
/* There can be empty mdats before the real one. If so, skip them */
- if (qtmovie.res->mdat_len == 0)
+ if (chunk_len == 8)
break;
+ read_chunk_mdat(&qtmovie, chunk_len);
+ qtmovie.res->mdat_offset=stream_tell(qtmovie.stream);
/* If we've already seen the format, assume there's nothing
interesting after the mdat chunk (the file is "streamable").
This avoids having to seek, which might cause rebuffering. */