Fixed some static analyizer warnings.
This commit is contained in:
1 parent
a7131d300c
commit
64163973f3
8 files changed
+25
-16
No files matched your search
@@ -589,10 +589,9 @@
|
||||
- (NSUInteger)timescaleForTrack:(MP42Track *)track {
|
||||
AVAssetTrack *assetTrack = [_localAsset trackWithTrackID:[track sourceId]];
|
||||
|
||||
CMFormatDescriptionRef formatDescription = NULL;
|
||||
NSArray *formatDescriptions = assetTrack.formatDescriptions;
|
||||
if ([formatDescriptions count] > 0)
|
||||
formatDescription = (CMFormatDescriptionRef)[formatDescriptions objectAtIndex:0];
|
||||
CMFormatDescriptionRef formatDescription = (CMFormatDescriptionRef) formatDescriptions.firstObject;
|
||||
if (formatDescriptions) {
|
||||
if ([[assetTrack mediaType] isEqualToString:AVMediaTypeAudio]) {
|
||||
const AudioStreamBasicDescription* const asbd =
|
||||
CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription);
|
||||
@@ -600,6 +599,7 @@
|
||||
double sampleRate = asbd->mSampleRate;
|
||||
|
||||
return (NSUInteger)sampleRate;
|
||||
}
|
||||
}
|
||||
|
||||
return [assetTrack naturalTimeScale];
|
||||
|
||||
Reference in new issue
Block a user