diff options
author | eddyg <[email protected]> | 2009-05-04 01:39:48 +0000 |
---|---|---|
committer | eddyg <[email protected]> | 2009-05-04 01:39:48 +0000 |
commit | 6be1d2f6861284fede24d8ca1021905846008a5a (patch) | |
tree | 9ba0b04aaeeddbe1e3c854a5986406d5bf6d107e /libhb/reader.c | |
parent | 1349c26c5417fd23676a4cb5cf572fbfe75e3b62 (diff) |
Stage 1 Soft Subtitle Support - Allow multiple subtitle tracks to be selected, and mark them for Render or Pass Through. No functional difference from the UIs, however in theory they could render multiple tracks - would be a dogs breakfast on screen though, and is untested. Have tested all normal operations from the UIs, including scanning.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2373 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r-- | libhb/reader.c | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/libhb/reader.c b/libhb/reader.c index 0acbe0921..e0345378f 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -516,37 +516,24 @@ static hb_fifo_t ** GetFifoForId( hb_job_t * job, int id ) } } - if( job->indepth_scan ) { - /* - * Count the occurances of the subtitles, don't actually - * return any to encode unless we are looking fro forced - * subtitles in which case we need to look in the sub picture - * to see if it has the forced flag enabled. - */ - for (i=0; i < hb_list_count(title->list_subtitle); i++) { - subtitle = hb_list_item( title->list_subtitle, i); - if (id == subtitle->id) { + for( i=0; i < hb_list_count( title->list_subtitle ); i++ ) { + subtitle = hb_list_item( title->list_subtitle, i ); + if (id == subtitle->id) { + subtitle->hits++; + if( !job->indepth_scan || job->subtitle_force ) + { /* - * A hit, count it. + * Pass the subtitles to be processed if we are not scanning, or if + * we are scanning and looking for forced subs, then pass them up + * to decode whether the sub is a forced one. */ - subtitle->hits++; - if( job->subtitle_force ) - { - - fifos[0] = subtitle->fifo_in; - return fifos; - } - break; + fifos[0] = subtitle->fifo_in; + return fifos; } - } - } else { - if( ( subtitle = hb_list_item( title->list_subtitle, 0 ) ) && - id == subtitle->id ) - { - fifos[0] = subtitle->fifo_in; - return fifos; + break; } } + if( !job->indepth_scan ) { n = 0; |