mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
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
This commit is contained in:
parent
4831d9f8ad
commit
305cbfe923
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user