diff options
author | Rodeo <[email protected]> | 2012-06-17 20:53:11 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-06-17 20:53:11 +0000 |
commit | 13f74fb405aaa811bb7ac0a4009e3a3a7e5a26e2 (patch) | |
tree | 9d58eb683f2799c5fe189f1a96509eb546ebb285 | |
parent | 0ad93d9a7cc5e51d302fdb0c57d1573ae9d435fb (diff) |
Fix Foreign Audio Search bug introduced in revision 4677.
interjob->select_subtitle was never freed, causing it to be added to all following queued encodes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4748 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/work.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libhb/work.c b/libhb/work.c index aa1cb0e53..c8e7822b8 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -594,7 +594,17 @@ static void do_job( hb_job_t * job ) * first burned subtitle (explicitly or after sanitizing) - which should * ensure that it doesn't get dropped. */ interjob->select_subtitle->out_track = 1; - hb_list_insert( title->list_subtitle, 0, hb_subtitle_copy( interjob->select_subtitle ) ); + if (job->pass == 0 || job->pass == 2) + { + // final pass, interjob->select_subtitle is no longer needed + hb_list_insert(title->list_subtitle, 0, interjob->select_subtitle); + interjob->select_subtitle = NULL; + } + else + { + // this is not the final pass, so we need to copy it instead + hb_list_insert(title->list_subtitle, 0, hb_subtitle_copy(interjob->select_subtitle)); + } } if ( !job->indepth_scan ) |