Check if magicCookie is available.
This commit is contained in:
1 parent
4d8b206f15
commit
88f4f94e1c
1 file changed
+6
@@ -592,6 +592,8 @@
|
|||||||
for (MP42Track *track in _workingTracks) {
|
for (MP42Track *track in _workingTracks) {
|
||||||
if (track.muxer_helper->converter && track.conversionSettings && [track isMemberOfClass:[MP42AudioTrack class]]) {
|
if (track.muxer_helper->converter && track.conversionSettings && [track isMemberOfClass:[MP42AudioTrack class]]) {
|
||||||
NSData *magicCookie = [track.muxer_helper->converter magicCookie];
|
NSData *magicCookie = [track.muxer_helper->converter magicCookie];
|
||||||
|
|
||||||
|
if (magicCookie) {
|
||||||
if (track.conversionSettings.format == kAudioFormatMPEG4AAC)
|
if (track.conversionSettings.format == kAudioFormatMPEG4AAC)
|
||||||
{
|
{
|
||||||
MP4SetTrackESConfiguration(_fileHandle, track.trackId,
|
MP4SetTrackESConfiguration(_fileHandle, track.trackId,
|
||||||
@@ -610,6 +612,10 @@
|
|||||||
MP4SetTrackIntegerProperty(_fileHandle, track.trackId, "mdia.minf.stbl.stsd.ac-3.dac3.bit_rate_code", ac3Info[5]);
|
MP4SetTrackIntegerProperty(_fileHandle, track.trackId, "mdia.minf.stbl.stsd.ac-3.dac3.bit_rate_code", ac3Info[5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
[_logger writeToLog:@"MagicCookie not found"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop the importers and clean ups
|
// Stop the importers and clean ups
|
||||||
|
|||||||
Reference in new issue
Block a user