summaryrefslogtreecommitdiffstats
path: root/libmpdemux/parse_mp4.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-05 18:22:51 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-05 18:22:51 +0000
commit305cbfe923fa599ac8e8fa8ed44f2512e706486d (patch)
tree5d007614d0258ebadcaff00df888650fe92398d8 /libmpdemux/parse_mp4.c
parent4831d9f8add229547836e0aad0c2eb64273cf4f5 (diff)
downloadmpv-305cbfe923fa599ac8e8fa8ed44f2512e706486d.tar.bz2
mpv-305cbfe923fa599ac8e8fa8ed44f2512e706486d.tar.xz
allow early exit from esds parsing, so decoder info (type & bitrate) are
available even if no codec-specific data or other extras found git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6930 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/parse_mp4.c')
-rw-r--r--libmpdemux/parse_mp4.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmpdemux/parse_mp4.c b/libmpdemux/parse_mp4.c
index b1fe69a49d..cccf2ee2c5 100644
--- a/libmpdemux/parse_mp4.c
+++ b/libmpdemux/parse_mp4.c
@@ -102,13 +102,15 @@ int mp4_parse_esds(unsigned char *data, int datalen, esds_t *esds) {
esds->bufferSizeDB, esds->maxBitrate/1000.0,
esds->avgBitrate/1000.0);
+ esds->decoderConfigLen=0;
+
if (len < 15) {
- freereturn(s,1);
+ freereturn(s,0);
}
/* get and verify DecSpecificInfoTag */
if (stream_read_char(s) != MP4DecSpecificDescrTag) {
- freereturn(s,1);
+ freereturn(s,0);
}
/* read length */
@@ -125,7 +127,7 @@ int mp4_parse_esds(unsigned char *data, int datalen, esds_t *esds) {
/* get and verify SLConfigDescrTag */
if(stream_read_char(s) != MP4SLConfigDescrTag) {
- freereturn(s,1);
+ freereturn(s,0);
}
/* Note: SLConfig is usually constant value 2, size 1Byte */