From 11cd3ab9c4a3f5448b6058fefcebab01b9a926dc Mon Sep 17 00:00:00 2001 From: Rodeo Date: Fri, 9 Sep 2011 23:32:53 +0000 Subject: libhb: fix incorrect decrementing of audio->config.out.track; it starts at 1, not 0. Also, explicitly log that we are dropping the track when we find an incompatible passthru. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: [01:26:41] Sample rate 24000 not supported (ca_haac). Using 32kHz for track 1 track 1 suddenly becomes track 0: [01:26:41] work: sanitizing track 0 mixdown Dolby Pro Logic II to Stereo [01:26:41] work: sanitizing track 0 audio bitrate 160 to 80 […] [01:26:41] * audio track 0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4210 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/work.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libhb/work.c') diff --git a/libhb/work.c b/libhb/work.c index 035d9c664..86f453ef1 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -540,10 +540,9 @@ static void do_job( hb_job_t * job ) { audio = hb_list_item( title->list_audio, i ); if( ( audio->config.out.codec & HB_ACODEC_PASS_FLAG ) && - !( audio->config.in.codec & audio->config.out.codec & - HB_ACODEC_PASS_MASK ) ) + !( audio->config.in.codec & audio->config.out.codec & HB_ACODEC_PASS_MASK ) ) { - hb_log( "Passthru requested and input codec is not the same as output codec for track %d", + hb_log( "Passthru requested and input codec is not the same as output codec for track %d, dropping track", audio->config.out.track ); hb_list_rem( title->list_audio, audio ); free( audio ); @@ -582,8 +581,8 @@ static void do_job( hb_job_t * job ) } /* Adjust output track number, in case we removed one. * Output tracks sadly still need to be in sequential order. - */ - audio->config.out.track = i++; + * Note: out.track starts at 1, i starts at 0 */ + audio->config.out.track = ++i; } int requested_mixdown = 0; -- cgit v1.2.3