Do not try to read the esds if there isn't one.
This commit is contained in:
1 file changed
+3
@@ -34,7 +34,9 @@
|
|||||||
|
|
||||||
if (self) {
|
if (self) {
|
||||||
MP4GetTrackFloatProperty(fileHandle, self.trackId, "tkhd.volume", &_volume);
|
MP4GetTrackFloatProperty(fileHandle, self.trackId, "tkhd.volume", &_volume);
|
||||||
|
const char *dataName = MP4GetTrackMediaDataName(fileHandle, self.trackId);
|
||||||
|
|
||||||
|
if (dataName && !strcmp(dataName, "mp4a")) {
|
||||||
u_int8_t audioType = MP4GetTrackEsdsObjectTypeId(fileHandle, self.trackId);
|
u_int8_t audioType = MP4GetTrackEsdsObjectTypeId(fileHandle, self.trackId);
|
||||||
|
|
||||||
if (audioType != MP4_INVALID_AUDIO_TYPE) {
|
if (audioType != MP4_INVALID_AUDIO_TYPE) {
|
||||||
@@ -74,6 +76,7 @@
|
|||||||
MP4GetTrackIntegerProperty(fileHandle, self.trackId, "mdia.minf.stbl.stsd.mp4a.channels", &channels_count);
|
MP4GetTrackIntegerProperty(fileHandle, self.trackId, "mdia.minf.stbl.stsd.mp4a.channels", &channels_count);
|
||||||
_channels = channels_count;
|
_channels = channels_count;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (MP4HaveTrackAtom(fileHandle, self.trackId, "mdia.minf.stbl.stsd.ac-3.dac3")) {
|
else if (MP4HaveTrackAtom(fileHandle, self.trackId, "mdia.minf.stbl.stsd.ac-3.dac3")) {
|
||||||
uint64_t acmod, lfeon;
|
uint64_t acmod, lfeon;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user