diff options
author | Rodeo <[email protected]> | 2015-05-17 16:13:09 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2015-05-17 16:13:09 +0000 |
commit | 06f06e9d3046766ea16b4dfb8821d528048a50f1 (patch) | |
tree | eaf4a545f9b7c25e2662117b905213a3cfa0a459 /libhb | |
parent | 2ee01596fafc8f36bdf828fc26861a191e43ceb3 (diff) |
preset_template: allow all supported passthru codecs by default.
That way, very old presets and (more importantly) built-in
presets do not force a restricted copy mask on the user.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7205 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/builtin_presets.h | 11 | ||||
-rw-r--r-- | libhb/preset.c | 11 | ||||
-rw-r--r-- | libhb/preset_template.json | 8 |
3 files changed, 21 insertions, 9 deletions
diff --git a/libhb/builtin_presets.h b/libhb/builtin_presets.h index fba7e1b67..2ad9f34ec 100644 --- a/libhb/builtin_presets.h +++ b/libhb/builtin_presets.h @@ -778,7 +778,16 @@ const char hb_builtin_presets_json[] = " ], \n" " \"PresetTemplate\": {\n" " \"Preset\": {\n" -" \"AudioCopyMask\": [], \n" +" \"AudioCopyMask\": [\n" +" \"copy:aac\", \n" +" \"copy:ac3\", \n" +" \"copy:dts\", \n" +" \"copy:dtshd\", \n" +" \"copy:eac3\", \n" +" \"copy:flac\", \n" +" \"copy:mp3\", \n" +" \"copy:truehd\"\n" +" ], \n" " \"AudioEncoderFallback\": \"ac3\", \n" " \"AudioLanguageList\": [\n" " \"und\"\n" diff --git a/libhb/preset.c b/libhb/preset.c index 3e06f5d82..f42951df7 100644 --- a/libhb/preset.c +++ b/libhb/preset.c @@ -1747,15 +1747,10 @@ dict_clean(hb_value_t *dict, hb_value_t *template) { key = hb_dict_iter_key(iter); template_val = hb_dict_iter_value(iter); - - if (hb_value_type(template_val) != HB_VALUE_TYPE_ARRAY && - hb_value_type(template_val) != HB_VALUE_TYPE_DICT) + val = hb_dict_get(dict, key); + if (val == NULL) { - val = hb_dict_get(dict, key); - if (val == NULL) - { - hb_dict_set(dict, key, hb_value_dup(template_val)); - } + hb_dict_set(dict, key, hb_value_dup(template_val)); } } } diff --git a/libhb/preset_template.json b/libhb/preset_template.json index c0a650703..e371a8ebc 100644 --- a/libhb/preset_template.json +++ b/libhb/preset_template.json @@ -1,5 +1,13 @@ { "AudioCopyMask": [ + "copy:aac", + "copy:ac3", + "copy:dts", + "copy:dtshd", + "copy:eac3", + "copy:flac", + "copy:mp3", + "copy:truehd" ], "AudioEncoderFallback": "ac3", "AudioLanguageList": [ |