summaryrefslogtreecommitdiffstats
path: root/libhb/muxmp4.c
diff options
context:
space:
mode:
authoreddyg <[email protected]>2008-10-10 04:43:13 +0000
committereddyg <[email protected]>2008-10-10 04:43:13 +0000
commitf1a5850f3f0aff7d0cbe10801ee650f78232fca9 (patch)
treecdd4669f62eb9c6ff4ea173f6f04012c0ac8312f /libhb/muxmp4.c
parent2a42c28786f15f007db8e03fc79ec8577a446faa (diff)
CLI: Add support for naming audio tracks to the HandBrakeCLI, thanks to LePetomane for the patch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1825 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-rw-r--r--libhb/muxmp4.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index febeb0194..807bc24cd 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -309,18 +309,36 @@ static int MP4Init( hb_mux_object_t * m )
mux_data->track = MP4AddAC3AudioTrack(
m->file,
m->samplerate, 1536, MP4_MPEG4_AUDIO_TYPE );
- MP4SetTrackBytesProperty(
- m->file, mux_data->track,
- "udta.name.value",
- (const u_int8_t*)"Surround", strlen("Surround"));
+ if (audio->config.out.name == NULL) {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)"Surround", strlen("Surround"));
+ }
+ else {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)(audio->config.out.name),
+ strlen(audio->config.out.name));
+ }
} else {
mux_data->track = MP4AddAudioTrack(
m->file,
m->samplerate, 1024, MP4_MPEG4_AUDIO_TYPE );
- MP4SetTrackBytesProperty(
- m->file, mux_data->track,
- "udta.name.value",
- (const u_int8_t*)"Stereo", strlen("Stereo"));
+ if (audio->config.out.name == NULL) {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)"Stereo", strlen("Stereo"));
+ }
+ else {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)(audio->config.out.name),
+ strlen(audio->config.out.name));
+ }
MP4SetAudioProfileLevel( m->file, 0x0F );
MP4SetTrackESConfiguration(