Do not crash if there is no magic cookie.
This commit is contained in:
1 file changed
+4
@@ -743,6 +743,10 @@
|
||||
size_t cookieSizeOut;
|
||||
const void *cookieBuffer = CMAudioFormatDescriptionGetMagicCookie(formatDescription, &cookieSizeOut);
|
||||
|
||||
if (cookieBuffer == NULL || cookieSizeOut == 0) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (code == kAudioFormatMPEG4AAC || code == kAudioFormatMPEG4AAC_HE || code == kAudioFormatMPEG4AAC_HE_V2) {
|
||||
|
||||
// Extract DecoderSpecific info
|
||||
|
||||
Reference in new issue
Block a user