From c36996ced365c839b01c5297d799ba79f1e05299 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sat, 8 Jun 2019 16:20:43 +0200 Subject: MacGui: write the queue to disk less often and add some validations when reading it back from disk. --- macosx/HBJob.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'macosx/HBJob.m') diff --git a/macosx/HBJob.m b/macosx/HBJob.m index ce7f9f586..7cd7c7fcf 100644 --- a/macosx/HBJob.m +++ b/macosx/HBJob.m @@ -426,7 +426,7 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; { decodeObjectOrFail(_name, NSString); decodeObjectOrFail(_presetName, NSString); - decodeInt(_titleIdx); + decodeInt(_titleIdx); if (_titleIdx < 0) { goto fail; } #ifdef __SANDBOX_ENABLED__ _fileURLBookmark = [decoder decodeObjectOfClass:[NSData class] forKey:@"_fileURLBookmark"]; @@ -459,8 +459,8 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; decodeObject(_outputFileName, NSString); - decodeInt(_container); - decodeInt(_angle); + decodeInt(_container); if (_container != HB_MUX_MP4 && _container != HB_MUX_MKV && _container != HB_MUX_WEBM) { goto fail; } + decodeInt(_angle); if (_angle < 0) { goto fail; } decodeBool(_mp4HttpOptimize); decodeBool(_mp4iPodCompatible); decodeBool(_alignAVStart); -- cgit v1.2.3