Skip to content

Commit

Permalink
libhb: update presets MetadataPassthrough key to MetadataPassthru
Browse files Browse the repository at this point in the history
  • Loading branch information
galad87 committed Oct 19, 2024
1 parent 8e50684 commit 44a3370
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libhb/handbrake/preset_builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -10128,7 +10128,7 @@ const char hb_builtin_presets_json[] =
" \"x264Option\": \"\",\n"
" \"x264UseAdvancedOptions\": false\n"
" },\n"
" \"VersionMajor\": 57,\n"
" \"VersionMajor\": 58,\n"
" \"VersionMicro\": 0,\n"
" \"VersionMinor\": 0\n"
" }\n"
Expand Down
18 changes: 18 additions & 0 deletions libhb/preset.c
Original file line number Diff line number Diff line change
Expand Up @@ -2956,6 +2956,12 @@ static void und_to_any(hb_value_array_t * list)
}
}

static void import_passthru_preset_settings_57_0_0(hb_value_t *preset)
{
int passthru = hb_dict_get_bool(preset, "MetadataPassthrough");
hb_dict_set_bool(preset, "MetadataPassthru", passthru);
}

static void import_av1_preset_settings_55_0_0(hb_value_t *preset)
{
const char *enc = hb_dict_get_string(preset, "VideoEncoder");
Expand Down Expand Up @@ -3701,9 +3707,16 @@ static void import_video_0_0_0(hb_value_t *preset)
}
}

static void import_57_0_0(hb_value_t *preset)
{
import_passthru_preset_settings_57_0_0(preset);
}

static void import_55_0_0(hb_value_t *preset)
{
import_av1_preset_settings_55_0_0(preset);

import_57_0_0(preset);
}

static void import_53_0_0(hb_value_t *preset)
Expand Down Expand Up @@ -3907,6 +3920,11 @@ static int preset_import(hb_value_t *preset, int major, int minor, int micro)
import_55_0_0(preset);
result = 1;
}
else if (cmpVersion(major, minor, micro, 57, 0, 0) <= 0)
{
import_57_0_0(preset);
result = 1;
}

preset_clean(preset, hb_preset_template);
}
Expand Down
2 changes: 1 addition & 1 deletion preset/preset_builtin.list
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources>
<section name="PresetTemplate">
<integer name="VersionMajor" value="57" />
<integer name="VersionMajor" value="58" />
<integer name="VersionMinor" value="0" />
<integer name="VersionMicro" value="0" />
<json name="Preset" file="preset_template.json" />
Expand Down
2 changes: 1 addition & 1 deletion preset/preset_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"Folder": false,
"FolderOpen": false,
"InlineParameterSets": false,
"MetadataPassthrough": true,
"MetadataPassthru": true,
"Optimize": false,
"Mp4iPodCompatible": false,
"PictureAllowUpscaling": false,
Expand Down

0 comments on commit 44a3370

Please sign in to comment.