Fix setAutoFallback:
This commit is contained in:
1 parent
88d38b2f71
commit
f47dbdb62e
4 files changed
+15
-10
No files matched your search
+4
-4
@@ -1063,13 +1063,13 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) {
|
||||
NSMutableArray<MP42AudioTrack *> *needFallbackTracks = [[NSMutableArray alloc] init];
|
||||
|
||||
for (MP42AudioTrack *track in [self tracksWithMediaType:kMP42MediaType_Audio] ) {
|
||||
if ((track.format == kMP42AudioCodecType_AC3 ||
|
||||
track.format == kMP42AudioCodecType_EnhancedAC3) &&
|
||||
if ((track.targetFormat == kMP42AudioCodecType_AC3 ||
|
||||
track.targetFormat == kMP42AudioCodecType_EnhancedAC3) &&
|
||||
track.fallbackTrack == nil) {
|
||||
[needFallbackTracks addObject:track];
|
||||
}
|
||||
else if (track.format == kMP42AudioCodecType_MPEG4AAC ||
|
||||
track.format == kMP42AudioCodecType_MPEG4AAC_HE) {
|
||||
else if (track.targetFormat == kMP42AudioCodecType_MPEG4AAC ||
|
||||
track.targetFormat == kMP42AudioCodecType_MPEG4AAC_HE) {
|
||||
[availableFallbackTracks addObject:track];
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@
|
||||
|
||||
- (BOOL)canAddTrack:(MP42Track *)track
|
||||
{
|
||||
if (isTrackMuxable(track.format) || isTrackMuxable(track.conversionSettings.format)) {
|
||||
if (isTrackMuxable(track.targetFormat)) {
|
||||
if ([track isMemberOfClass:[MP42AudioTrack class]]) {
|
||||
// TO-DO Check if we can initialize the audio converter
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property(nonatomic, readwrite, copy) NSURL *URL;
|
||||
|
||||
@property(nonatomic, readonly) MP42CodecType targetFormat;
|
||||
@property(nonatomic, readwrite) MP42CodecType format;
|
||||
@property(nonatomic, readwrite) MP42MediaType mediaType;
|
||||
|
||||
|
||||
+9
-5
@@ -349,16 +349,20 @@
|
||||
_updatedProperty[@"start_offset"] = @YES;
|
||||
}
|
||||
|
||||
- (NSString *)formatSummary
|
||||
- (MP42CodecType)targetFormat
|
||||
{
|
||||
if (self.conversionSettings) {
|
||||
return localizedDisplayName(_mediaType, self.conversionSettings.format);
|
||||
}
|
||||
else {
|
||||
return localizedDisplayName(_mediaType, _format);
|
||||
return self.conversionSettings.format;
|
||||
} else {
|
||||
return self.format;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)formatSummary
|
||||
{
|
||||
return localizedDisplayName(_mediaType, self.targetFormat);
|
||||
}
|
||||
|
||||
#pragma mark - NSSecureCoding
|
||||
|
||||
+ (BOOL)supportsSecureCoding
|
||||
|
||||
Reference in new issue
Block a user