summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-08-30 03:51:55 +0000
committereddyg <[email protected]>2007-08-30 03:51:55 +0000
commit479dd465c30a7a860569f37c7da103033a4ccf44 (patch)
tree287a5c6231079ad339207c3cb8701df405596853
parente9d7bc3fc67313edf9cf76644515da658d101029 (diff)
Added progress marking for when doing the subtitle scan
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@901 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/reader.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libhb/reader.c b/libhb/reader.c
index 8980c1cc6..506774557 100644
--- a/libhb/reader.c
+++ b/libhb/reader.c
@@ -117,6 +117,28 @@ static void ReaderFunc( void * _r )
break;
}
}
+
+ if( r->job->subtitle_scan )
+ {
+ /*
+ * Need to update the progress during a subtitle scan
+ */
+ hb_state_t state;
+
+#define p state.param.working
+
+ state.state = HB_STATE_WORKING;
+ p.progress = (float)chapter / (float)r->job->chapter_end;
+ if( p.progress > 1.0 )
+ {
+ p.progress = 1.0;
+ }
+ p.rate_avg = 0.0;
+ p.hours = -1;
+ p.minutes = -1;
+ p.seconds = -1;
+ hb_set_state( r->job->h, &state );
+ }
hb_demux_ps( r->ps, list );