summaryrefslogtreecommitdiffstats
path: root/libhb/bd.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-03-10 12:56:55 -0700
committerGitHub <[email protected]>2017-03-10 12:56:55 -0700
commitbd22891d633e16d7aedddadd2e4dd716f615d847 (patch)
tree4194d0fd483759f8e8f5226ac479e5ad193a9ef9 /libhb/bd.c
parent1f6c91c00be0f8f47de1d5c77b945ad6ecd50ec5 (diff)
subtitles: simplify and shorten subtitle descriptions (#591)
* subtitles: simplify and shorten subtitle descriptions Generally, it eliminates parens to make things more readable. I.e. it turns this: English (Closed Caption)(Wide Screen)(Bitmap)(VOBSUB) Into this: English, Closed Caption [Wide Screen, VOBSUB] * Revise punctuation per BradleyS request * fix subtitle description formatting * incorporate suggestions from PR
Diffstat (limited to 'libhb/bd.c')
-rw-r--r--libhb/bd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libhb/bd.c b/libhb/bd.c
index 98f49206c..843fd6c53 100644
--- a/libhb/bd.c
+++ b/libhb/bd.c
@@ -95,11 +95,6 @@ static void add_subtitle(int track, hb_list_t *list_subtitle, BLURAY_STREAM_INFO
subtitle->track = track;
subtitle->id = bdsub->pid;
- lang = lang_for_code2( (char*)bdsub->lang );
- snprintf( subtitle->lang, sizeof( subtitle->lang ), "%s",
- strlen(lang->native_name) ? lang->native_name : lang->eng_name);
- snprintf( subtitle->iso639_2, sizeof( subtitle->iso639_2 ), "%s",
- lang->iso639_2);
switch ( bdsub->coding_type )
{
@@ -113,6 +108,13 @@ static void add_subtitle(int track, hb_list_t *list_subtitle, BLURAY_STREAM_INFO
free( subtitle );
return;
}
+ lang = lang_for_code2( (char*)bdsub->lang );
+ snprintf(subtitle->lang, sizeof( subtitle->lang ), "%s [%s]",
+ strlen(lang->native_name) ? lang->native_name : lang->eng_name,
+ hb_subsource_name(subtitle->source));
+ snprintf(subtitle->iso639_2, sizeof( subtitle->iso639_2 ), "%s",
+ lang->iso639_2);
+
subtitle->reg_desc = STR4_TO_UINT32("HDMV");
subtitle->stream_type = bdsub->coding_type;
subtitle->codec = codec;