summaryrefslogtreecommitdiffstats
path: root/libhb/dvd.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-08-06 16:56:50 -0600
committerJohn Stebbins <[email protected]>2019-08-11 15:36:41 -0700
commit7e5b372eeb3db720b0bc22419f621f40eff6dd87 (patch)
tree497c3b027b3eff241474cbce20520a263189382b /libhb/dvd.c
parent9b997b772e252459c8f29cec86d26b5604023819 (diff)
dvd: create track named from dvd track attributes
Diffstat (limited to 'libhb/dvd.c')
-rw-r--r--libhb/dvd.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libhb/dvd.c b/libhb/dvd.c
index bc21248c3..08ac79897 100644
--- a/libhb/dvd.c
+++ b/libhb/dvd.c
@@ -210,6 +210,7 @@ static void add_subtitle( hb_list_t * list_subtitle, int position,
memcpy(subtitle->palette, palette, 16 * sizeof(uint32_t));
subtitle->palette_set = 1;
+ const char * name = NULL;
switch (lang_extension)
{
case 1:
@@ -218,23 +219,28 @@ static void add_subtitle( hb_list_t * list_subtitle, int position,
case 2:
subtitle->attributes = HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Large Type");
+ name = "Large Type";
break;
case 3:
subtitle->attributes = HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Children");
+ name = "Children";
break;
case 5:
subtitle->attributes = HB_SUBTITLE_ATTR_CC;
strcat(subtitle->lang, " Closed Caption");
+ name = "Closed Caption";
break;
case 6:
subtitle->attributes = HB_SUBTITLE_ATTR_CC | HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Closed Caption, Large Type");
+ name = "Closed Caption, Large Type";
break;
case 7:
subtitle->attributes = HB_SUBTITLE_ATTR_CC |
HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Closed Caption, Children");
+ name = "Closed Caption, Children";
break;
case 9:
subtitle->attributes = HB_SUBTITLE_ATTR_FORCED;
@@ -243,20 +249,27 @@ static void add_subtitle( hb_list_t * list_subtitle, int position,
case 13:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY;
strcat(subtitle->lang, " Director's Commentary");
+ name = "Commentary";
break;
case 14:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY |
HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Director's Commentary, Large Type");
+ name = "Commentary, Large Type";
break;
case 15:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY |
HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Director's Commentary, Children");
+ name = "Commentary, Children";
default:
subtitle->attributes = HB_SUBTITLE_ATTR_UNKNOWN;
break;
}
+ if (name != NULL)
+ {
+ subtitle->name = strdup(name);
+ }
switch (style)
{
case HB_VOBSUB_STYLE_4_3:
@@ -520,6 +533,7 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur
lang = lang_for_code( lang_code );
+ const char * name = NULL;
switch ( lang_extension )
{
case 1:
@@ -527,17 +541,24 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur
break;
case 2:
audio->config.lang.attributes = HB_AUDIO_ATTR_VISUALLY_IMPAIRED;
+ name = "Visually Impaired";
break;
case 3:
audio->config.lang.attributes = HB_AUDIO_ATTR_COMMENTARY;
+ name = "Commentary";
break;
case 4:
audio->config.lang.attributes = HB_AUDIO_ATTR_ALT_COMMENTARY;
+ name = "Commentary";
break;
default:
audio->config.lang.attributes = HB_AUDIO_ATTR_NONE;
break;
}
+ if (name != NULL)
+ {
+ audio->config.in.name = strdup(name);
+ }
snprintf( audio->config.lang.simple,
sizeof( audio->config.lang.simple ), "%s",