diff options
author | Damiano Galassi <[email protected]> | 2019-08-14 07:21:48 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-08-14 07:21:48 +0200 |
commit | 4a710ddbff7f89bf96a993b8125e9d4e8d4a9fdf (patch) | |
tree | f50554ff272a23afef63ef802652235666045f2f /macosx/HBAudio.m | |
parent | f733d04817f949554176aed401c505a950c054b9 (diff) |
MacGui: fix an exception when reading an HBJob from disk; do not store previews image when scanning the title in the queue; set the log level immediately; improve progress info when the pass number is not set yet.
Diffstat (limited to 'macosx/HBAudio.m')
-rw-r--r-- | macosx/HBAudio.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index f6427b8db..adbee0e3e 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -43,7 +43,7 @@ NSString *HBAudioEncoderChangedNotification = @"HBAudioEncoderChangedNotificatio _tracks = [[NSMutableArray alloc] init]; _defaults = [[HBAudioDefaults alloc] init]; - // Add the none and foreign track to the source array + // Add the none track to the source array NSMutableArray<HBTitleAudioTrack *> *sourceTracks = [job.title.audioTracks mutableCopy]; HBTitleAudioTrack *none = [[HBTitleAudioTrack alloc] initWithDisplayName:HBKitLocalizedString(@"None", @"HBAudio -> none track name")]; [sourceTracks insertObject:none atIndex:0]; @@ -279,7 +279,9 @@ NSString *HBAudioEncoderChangedNotification = @"HBAudioEncoderChangedNotificatio decodeInt(_container); if (_container != HB_MUX_MP4 && _container != HB_MUX_MKV && _container != HB_MUX_WEBM) { goto fail; } decodeCollectionOfObjects(_sourceTracks, NSArray, HBTitleAudioTrack); + if (_sourceTracks == nil || _sourceTracks.count < 1) { goto fail; } decodeCollectionOfObjects(_tracks, NSMutableArray, HBAudioTrack); + if (_tracks == nil) { goto fail; } for (HBAudioTrack *track in _tracks) { |