summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2008-10-11 19:19:27 +0000
committerjbrjake <[email protected]>2008-10-11 19:19:27 +0000
commit41eca636c632641e2c10176293ded9c737b40ae9 (patch)
treee40e2fdddd94d84bf097c2e4f7539771168ca7f4
parent7a96c383e330581bc82595a368622781905a3210 (diff)
Only associate audio tracks with an alternate group if there's more than one audio track. That way the iPhone doesn't show the audio selection button when it isn't necessary.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1828 b64f7644-9d1e-0410-96f1-a4d463321fa5
-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 */