diff options
author | John Stebbins <[email protected]> | 2019-08-06 16:56:50 -0600 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-08-11 15:36:41 -0700 |
commit | 7e5b372eeb3db720b0bc22419f621f40eff6dd87 (patch) | |
tree | 497c3b027b3eff241474cbce20520a263189382b /libhb/dvdnav.c | |
parent | 9b997b772e252459c8f29cec86d26b5604023819 (diff) |
dvd: create track named from dvd track attributes
Diffstat (limited to 'libhb/dvdnav.c')
-rw-r--r-- | libhb/dvdnav.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 03a86e906..d3a15dad4 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -356,6 +356,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: @@ -364,23 +365,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; @@ -389,20 +395,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: @@ -638,6 +651,7 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura { continue; } + const char * name = NULL; switch ( lang_extension ) { case 1: @@ -645,17 +659,24 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura 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); + } /* Check for duplicate tracks */ audio_tmp = NULL; |