diff options
author | Damiano Galassi <[email protected]> | 2019-08-15 07:39:10 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-08-15 07:39:10 +0200 |
commit | ba6c7ff5b3f5d4f680869727b01037dc6ab42e1e (patch) | |
tree | 014195cf7612ddddc89de892450c3237ae3e35c4 /macosx/HBAudio.m | |
parent | c8e8231c381b03fc02f3fe8410dc851af8591ac6 (diff) |
MacGui: make use of some newer NSCoding api to better report decoding failure.
Diffstat (limited to 'macosx/HBAudio.m')
-rw-r--r-- | macosx/HBAudio.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index adbee0e3e..549c87d34 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -278,10 +278,9 @@ NSString *HBAudioEncoderChangedNotification = @"HBAudioEncoderChangedNotificatio self = [super init]; 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; } + decodeCollectionOfObjectsOrFail(_sourceTracks, NSArray, HBTitleAudioTrack); + if (_sourceTracks.count < 1) { goto fail; } + decodeCollectionOfObjectsOrFail(_tracks, NSMutableArray, HBAudioTrack); for (HBAudioTrack *track in _tracks) { |