Add an additional check on the number of audio channels.
This commit is contained in:
1 parent
5ed79ebe39
commit
bb12555844
2 files changed
+7
-2
No files matched your search
@@ -597,6 +597,11 @@ OSStatus DecoderDataProc(AudioConverterRef inAudioConverter,
|
|||||||
inputChannelsCount = [track sourceChannels];
|
inputChannelsCount = [track sourceChannels];
|
||||||
outputChannelCount = [track channels];
|
outputChannelCount = [track channels];
|
||||||
|
|
||||||
|
if (inputChannelsCount == 0 || outputChannelCount == 0 || sampleRate == 0) {
|
||||||
|
[self release];
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
if (outputChannelCount > inputChannelsCount)
|
if (outputChannelCount > inputChannelsCount)
|
||||||
outputChannelCount = inputChannelsCount;
|
outputChannelCount = inputChannelsCount;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -50,8 +50,8 @@
|
|||||||
|
|
||||||
for (MP42Track *track in _workingTracks) {
|
for (MP42Track *track in _workingTracks) {
|
||||||
MP4TrackId dstTrackId = 0;
|
MP4TrackId dstTrackId = 0;
|
||||||
NSData *magicCookie;
|
NSData *magicCookie = nil;;
|
||||||
NSInteger timeScale;
|
NSInteger timeScale = 0;
|
||||||
muxer_helper *helper = track.muxer_helper;
|
muxer_helper *helper = track.muxer_helper;
|
||||||
|
|
||||||
if (helper) {
|
if (helper) {
|
||||||
|
|||||||
Reference in new issue
Block a user