diff options
author | Rodeo <[email protected]> | 2012-05-01 13:53:12 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-05-01 13:53:12 +0000 |
commit | 9eb8646ec2f9a8167c93aae08d55533d8a5984a3 (patch) | |
tree | ba322cf1fdbfb5eda27d7f24402fdca98eafcbf5 /libhb/decvobsub.c | |
parent | df3daf7cdd85794ef3d7f0eff181eb3b323a489f (diff) |
Simplify Foreign Audio Search code:
- move all subtitle hit counting to the decoders instead of reader
---> allows us to count actual subtitles rather than just packets
- always count subtitles, even when not doing a scan (may be useful in the future)
Miscellaneous improvements:
- always insert select_subtitle at the head of the output subtitle list, to make it less likely to be dropped
- when multiple subtitle tracks have forced hits, pick the track with the fewest forced hits
---> Foreign Audio Search should now work with Star Wars on Blu-ray
- logging improvements (more readable, and log job->select_subtitle configuration - Forced Only vs. All, Render vs. Passthrough)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4622 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decvobsub.c')
-rw-r--r-- | libhb/decvobsub.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index 43f2aefd9..9a9b50a19 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -259,28 +259,14 @@ static void ParseControls( hb_work_object_t * w ) case 0x00: // 0x00 - FSTA_DSP - Forced Start Display, no arguments pv->pts_start = pv->pts + date * 1024; pv->pts_forced = 1; - - /* - * If we are doing a subtitle scan then note down - */ - if( job->indepth_scan ) - { - for( n=0; n < hb_list_count(title->list_subtitle); n++ ) - { - subtitle = hb_list_item( title->list_subtitle, n); - if( pv->stream_id == subtitle->id ) { - /* - * A hit, count it. - */ - subtitle->forced_hits++; - } - } - } + w->subtitle->hits++; + w->subtitle->forced_hits++; break; case 0x01: // 0x01 - STA_DSP - Start Display, no arguments pv->pts_start = pv->pts + date * 1024; pv->pts_forced = 0; + w->subtitle->hits++; break; case 0x02: // 0x02 - STP_DSP - Stop Display, no arguments |