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 798434b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
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_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 798434b

Please sign in to comment.