summaryrefslogtreecommitdiffstats
path: root/macosx/HBSubtitlesDefaults.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-06-08 16:20:43 +0200
committerDamiano Galassi <[email protected]>2019-06-08 16:20:43 +0200
commitc36996ced365c839b01c5297d799ba79f1e05299 (patch)
treeb584d6a570d36def3f07ef7a4e8f7ae36ac0f64c /macosx/HBSubtitlesDefaults.m
parent908b78452f8e53b5a9de3a592949eb30b21a5ec5 (diff)
MacGui: write the queue to disk less often and add some validations when reading it back from disk.
Diffstat (limited to 'macosx/HBSubtitlesDefaults.m')
-rw-r--r--macosx/HBSubtitlesDefaults.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/macosx/HBSubtitlesDefaults.m b/macosx/HBSubtitlesDefaults.m
index c6e8179d7..891f5e6e9 100644
--- a/macosx/HBSubtitlesDefaults.m
+++ b/macosx/HBSubtitlesDefaults.m
@@ -226,6 +226,10 @@
self = [super init];
decodeInteger(_trackSelectionBehavior);
+ if (_trackSelectionBehavior < HBSubtitleTrackSelectionBehaviorNone || _trackSelectionBehavior > HBSubtitleTrackSelectionBehaviorAll)
+ {
+ goto fail;
+ }
decodeObjectOrFail(_trackSelectionLanguages, NSMutableArray);
decodeBool(_addForeignAudioSearch);
@@ -233,6 +237,10 @@
decodeBool(_addCC);
decodeInteger(_burnInBehavior);
+ if (_burnInBehavior < HBSubtitleTrackBurnInBehaviorNone || _burnInBehavior > HBSubtitleTrackBurnInBehaviorForeignAudioThenFirst)
+ {
+ goto fail;
+ }
decodeBool(_burnInDVDSubtitles);
decodeBool(_burnInBluraySubtitles);