summaryrefslogtreecommitdiffstats
path: root/libhb/reader.c
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-08-21 03:24:39 +0000
committereddyg <[email protected]>2007-08-21 03:24:39 +0000
commitb4be9fecbbe66767fcf3b25aec8628d3f6b789ec (patch)
treeb14084f5f504abc08826d2cd7662f21c7b0e5982 /libhb/reader.c
parenta035bfd29afeb4560d85a295a405a83b76e68784 (diff)
Add Subtitle scanning for forced subtitles and normal subtitles from the CLI
and the MacOS GUI. See the new subtitle language options in the GUI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@844 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r--libhb/reader.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/libhb/reader.c b/libhb/reader.c
index 335dfb80d..8980c1cc6 100644
--- a/libhb/reader.c
+++ b/libhb/reader.c
@@ -172,12 +172,23 @@ static hb_fifo_t * GetFifoForId( hb_job_t * job, int id )
if( id == 0xE0 )
{
- return job->fifo_mpeg2;
+ if( !job->subtitle_scan )
+ {
+ return job->fifo_mpeg2;
+ } else {
+ /*
+ * Ditch the mpeg2 video when doing a subtitle scan.
+ */
+ return NULL;
+ }
}
if (job->subtitle_scan) {
/*
- * Count the occurances of the subtitles, don't actually return any to encode.
+ * 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);
@@ -186,6 +197,11 @@ static hb_fifo_t * GetFifoForId( hb_job_t * job, int id )
* A hit, count it.
*/
subtitle->hits++;
+ if( job->subtitle_force )
+ {
+ return subtitle->fifo_in;
+ }
+ break;
}
}
} else {