diff options
author | jstebbins <[email protected]> | 2010-06-26 16:55:26 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-06-26 16:55:26 +0000 |
commit | 3ed004417a07816027e9585bee54fd459face6ed (patch) | |
tree | eb7d59f8cb514a760eb8f4d66d88ee1e13180c10 /libhb | |
parent | 545c09e691d2b66994e7b6428582b4cf66d5515a (diff) |
Preserve subtitle track that matches foreign audio search when the
resulting output track would not be an exact duplicate. We
were removing the track even when forced flags differed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3407 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/work.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libhb/work.c b/libhb/work.c index c219dd8cd..e9b15d6de 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -696,6 +696,7 @@ static void do_job( hb_job_t * job, int cpu_count ) /* * Look for the scanned subtitle in the existing subtitle list + * select_subtitle implies that we did a scan. */ if ( !job->indepth_scan && interjob->select_subtitle && ( job->pass == 0 || job->pass == 2 ) ) @@ -703,8 +704,6 @@ static void do_job( hb_job_t * job, int cpu_count ) /* * Disable forced subtitles if we didn't find any in the scan * so that we display normal subtitles instead. - * - * select_subtitle implies that we did a scan. */ if( interjob->select_subtitle->config.force && interjob->select_subtitle->forced_hits == 0 ) @@ -718,12 +717,14 @@ static void do_job( hb_job_t * job, int cpu_count ) if( subtitle ) { /* - * Disable forced subtitles if we didn't find any in the scan - * so that we display normal subtitles instead. - * - * select_subtitle implies that we did a scan. + * Remove the scanned subtitle from the subtitle list if + * it would result in an identical duplicate subtitle track + * or an emty track (forced and no forced hits). */ - if( interjob->select_subtitle->id == subtitle->id ) + if( ( interjob->select_subtitle->id == subtitle->id ) && + ( ( interjob->select_subtitle->forced_hits == 0 && + subtitle->config.force ) || + ( subtitle->config.force == interjob->select_subtitle->config.force ) ) ) { *subtitle = *(interjob->select_subtitle); free( interjob->select_subtitle ); |