Guess a layout for PCM tracks if none is set.
This commit is contained in:
1 parent
72c721db22
commit
69cb3ea22c
7 files changed
+69
-7
No files matched your search
@@ -15,6 +15,7 @@
|
||||
|
||||
#import "mp4v2.h"
|
||||
#import "MP42PrivateUtilities.h"
|
||||
#import "MP42FormatUtilites.h"
|
||||
#import "MP42Track+Muxer.h"
|
||||
#import "MP42Track+Private.h"
|
||||
|
||||
@@ -183,8 +184,10 @@
|
||||
audioTrack.channelLayoutTag = layout->mChannelLayoutTag;
|
||||
}
|
||||
else {
|
||||
audioTrack.channels = 1;
|
||||
audioTrack.channelLayoutTag = kAudioChannelLayoutTag_Mono;
|
||||
// Guess the layout.
|
||||
const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription);
|
||||
audioTrack.channels = asbd->mChannelsPerFrame;
|
||||
audioTrack.channelLayoutTag = getDefaultChannelLayout(asbd->mChannelsPerFrame);
|
||||
}
|
||||
}
|
||||
newTrack = audioTrack;
|
||||
|
||||
Reference in new issue
Block a user