summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudio.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-15 07:39:10 +0200
committerDamiano Galassi <[email protected]>2019-08-15 07:39:10 +0200
commitba6c7ff5b3f5d4f680869727b01037dc6ab42e1e (patch)
tree014195cf7612ddddc89de892450c3237ae3e35c4 /macosx/HBAudio.m
parentc8e8231c381b03fc02f3fe8410dc851af8591ac6 (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.m7
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)
{