diff options
author | John Stebbins <[email protected]> | 2017-11-06 10:48:26 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-06 10:48:26 -0800 |
commit | 8a68af4675fd90f58ab0b8a191345847bff94cea (patch) | |
tree | 5f473c29873fe702e9d2177903557cbd6acb79c3 /libhb/stream.c | |
parent | d438e35c7edf9a94cddb7853fe68a50207d1027d (diff) |
CLI: add option to log version, title, and progress in json
This is useful for scripts and other frontends that need to parse CLI output.
Diffstat (limited to 'libhb/stream.c')
-rw-r--r-- | libhb/stream.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index 6d849d776..a2d50447e 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -1930,7 +1930,6 @@ static void set_audio_description(hb_audio_t *audio, iso639_lang_t *lang) strlen( lang->native_name ) ? lang->native_name : lang->eng_name ); snprintf( audio->config.lang.iso639_2, sizeof( audio->config.lang.iso639_2 ), "%s", lang->iso639_2 ); - audio->config.lang.type = 0; } // Sort specifies the index in the audio list where you would @@ -5152,6 +5151,11 @@ static void add_ffmpeg_audio(hb_title_t *title, hb_stream_t *stream, int id) break; } + if (st->disposition & AV_DISPOSITION_DEFAULT) + { + audio->config.lang.attributes |= HB_AUDIO_ATTR_DEFAULT; + } + set_audio_description(audio, lang_for_code2(tag != NULL ? tag->value : "und")); hb_list_add(title->list_audio, audio); @@ -5358,6 +5362,11 @@ static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t *stream, int id if (st->disposition & AV_DISPOSITION_DEFAULT) { subtitle->config.default_track = 1; + subtitle->attributes |= HB_SUBTITLE_ATTR_DEFAULT; + } + if (st->disposition & AV_DISPOSITION_FORCED) + { + subtitle->attributes |= HB_SUBTITLE_ATTR_FORCED; } subtitle->track = hb_list_count(title->list_subtitle); |