diff options
author | maurj <[email protected]> | 2007-05-04 20:25:54 +0000 |
---|---|---|
committer | maurj <[email protected]> | 2007-05-04 20:25:54 +0000 |
commit | 51f567d40d8706914b4bfca9670f2a8e609aebea (patch) | |
tree | bb24a6cb5b5a59d3123861152df0b71d231b9a86 /libhb/work.c | |
parent | 591ed584e495676043f6b4df29c26186263c66e6 (diff) |
Updated do_job() in work.c to remove any non-AC3 audio tracks from the job before performing AC3 passthru. This prevents Bad Things from happening when a DTS, MPEG2 or LPCM audio track is selected and AC3 passthru to AVI is selected.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@569 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libhb/work.c b/libhb/work.c index e45ee7bab..7cdb09fcc 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -216,6 +216,20 @@ static void do_job( hb_job_t * job, int cpu_count ) "vorbis" ) ); } + /* if we are doing AC3 passthru, then remove any non-AC3 audios from the job */ + /* otherwise, Bad Things will happen */ + for( i = 0; i < hb_list_count( title->list_audio ); ) + { + audio = hb_list_item( title->list_audio, i ); + if( ( job->acodec & HB_ACODEC_AC3 ) && ( audio->codec != HB_ACODEC_AC3 ) ) + { + hb_list_rem( title->list_audio, audio ); + free( audio ); + continue; + } + i++; + } + for( i = 0; i < hb_list_count( title->list_audio ); i++ ) { audio = hb_list_item( title->list_audio, i ); |