summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-03-22 11:24:03 -0700
committerJohn Stebbins <[email protected]>2017-03-22 11:24:03 -0700
commit21aceef60d6dcdd5f523fbae21357c666b9d7f6d (patch)
tree9024667c4db37805e6d4d91f8d35dd384d915413
parente62df5343da115e8f441cc1d7b8acee75bc3af07 (diff)
CLI: don't override preset subtitle burn defaults...
Unless user explicitly overrides with command line options
-rw-r--r--test/test.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/test/test.c b/test/test.c
index 8baea7826..b23f73bb3 100644
--- a/test/test.c
+++ b/test/test.c
@@ -113,8 +113,8 @@ static char ** subtitle_lang_list = NULL;
static char ** subtracks = NULL;
static char ** subforce = NULL;
static int subtitle_all = -1;
-static int subburn = 0;
-static int subburn_native = 0;
+static int subburn = -1;
+static int subburn_native = -1;
static int subdefault = 0;
static char ** srtfile = NULL;
static char ** srtcodeset = NULL;
@@ -3171,31 +3171,34 @@ static hb_dict_t * PreparePreset(const char *preset_name)
// Add foreign audio search
hb_dict_set(preset, "SubtitleAddForeignAudioSearch", hb_value_bool(1));
}
- // Subtitle burn behavior
- const char *burn = "none";
- if (subtitle_track_count == 0)
+ if (subburn_native >= 0 || subburn >= 0)
{
- if (subburn_native && subburn == 1)
+ // Subtitle burn behavior
+ const char *burn = "none";
+ if (subtitle_track_count == 0)
{
- burn = "foreign_first";
- }
- else if (subburn_native)
- {
- burn = "foreign";
- }
- else if (subburn == 1)
- {
- burn = "first";
+ if (subburn_native == 1 && subburn == 1)
+ {
+ burn = "foreign_first";
+ }
+ else if (subburn_native == 1)
+ {
+ burn = "foreign";
+ }
+ else if (subburn == 1)
+ {
+ burn = "first";
+ }
}
- }
- else
- {
- if (subburn_native)
+ else
{
- burn = "foreign";
+ if (subburn_native == 1)
+ {
+ burn = "foreign";
+ }
}
+ hb_dict_set(preset, "SubtitleBurnBehavior", hb_value_string(burn));
}
- hb_dict_set(preset, "SubtitleBurnBehavior", hb_value_string(burn));
const char *selection = NULL;
if (subtitle_track_count == 0 && subtitle_all != -1)
{