summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/muxmp4.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index 807bc24cd..d36da397d 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -349,7 +349,10 @@ static int MP4Init( hb_mux_object_t * m )
reserved2[9] = (u_int8_t)HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->config.out.mixdown);
MP4SetTrackBytesProperty(m->file, mux_data->track, "mdia.minf.stbl.stsd.mp4a.reserved2", reserved2, sizeof(reserved2));
+ /* If we ever upgrade mpeg4ip, the line above should be replaced with the line below.*/
+ // MP4SetTrackIntegerProperty(m->file, mux_data->track, "mdia.minf.stbl.stsd.mp4a.channels", (u_int16_t)HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->amixdown));
}
+
/* Set the language for this track */
/* The language is stored as 5-bit text - 0x60 */
language_code = audio->config.lang.iso639_2[0] - 0x60; language_code <<= 5;
@@ -357,12 +360,11 @@ static int MP4Init( hb_mux_object_t * m )
language_code |= audio->config.lang.iso639_2[2] - 0x60;
MP4SetTrackIntegerProperty(m->file, mux_data->track, "mdia.mdhd.language", language_code);
-
- /* Set the audio track alternate group */
- MP4SetTrackIntegerProperty(m->file, mux_data->track, "tkhd.alternate_group", 1);
-
- /* If we ever upgrade mpeg4ip, the line above should be replaced with the line below.*/
-// MP4SetTrackIntegerProperty(m->file, mux_data->track, "mdia.minf.stbl.stsd.mp4a.channels", (u_int16_t)HB_AMIXDOWN_GET_DISCRETE_CHANNEL_COUNT(audio->amixdown));
+ if( hb_list_count( title->list_audio ) > 1 )
+ {
+ /* Set the audio track alternate group */
+ MP4SetTrackIntegerProperty(m->file, mux_data->track, "tkhd.alternate_group", 1);
+ }
if (i == 0) {
/* Enable the first audio track */