summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob+HBJobConversion.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-01-15 14:26:33 +0100
committerDamiano Galassi <[email protected]>2019-01-15 14:26:33 +0100
commit8fcde66f6ae16352e8473a35d5b87cd4482e70e7 (patch)
tree207e5a76d09a219d40b9b944bb689377657e58b3 /macosx/HBJob+HBJobConversion.m
parent89742d0c72d8cfe67f9236f0361e606cf5fab8ae (diff)
MacGui: support SSA file import.
Diffstat (limited to 'macosx/HBJob+HBJobConversion.m')
-rw-r--r--macosx/HBJob+HBJobConversion.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m
index 151e2ed8c..c9d01885f 100644
--- a/macosx/HBJob+HBJobConversion.m
+++ b/macosx/HBJob+HBJobConversion.m
@@ -254,10 +254,11 @@
}
else
{
- // if we are getting the subtitles from an external srt file
- if (subTrack.type == SRTSUB)
+ // if we are getting the subtitles from an external file
+ if (subTrack.type == IMPORTSRT || subTrack.type == IMPORTSSA)
{
hb_subtitle_config_t sub_config;
+ int type = subTrack.type;
sub_config.offset = subTrack.offset;
@@ -267,18 +268,18 @@
strncpy(sub_config.src_codeset, subTrack.charCode.UTF8String, 39);
sub_config.src_codeset[39] = 0;
- if (!subTrack.burnedIn && hb_subtitle_can_pass(SRTSUB, job->mux))
+ if (!subTrack.burnedIn && hb_subtitle_can_pass(type, job->mux))
{
sub_config.dest = PASSTHRUSUB;
}
- else if (hb_subtitle_can_burn(SRTSUB))
+ else if (hb_subtitle_can_burn(type))
{
sub_config.dest = RENDERSUB;
}
sub_config.force = 0;
sub_config.default_track = subTrack.def;
- hb_srt_add( job, &sub_config, subTrack.isoLanguage.UTF8String);
+ hb_import_subtitle_add( job, &sub_config, subTrack.isoLanguage.UTF8String, type);
}
else
{