summaryrefslogtreecommitdiffstats
path: root/libhb/decsrtsub.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-09-27 19:36:19 +0000
committerjstebbins <[email protected]>2009-09-27 19:36:19 +0000
commit0d19fddb1c3744fda3a5c4d099e1eb745a86e0ed (patch)
tree1fdb0588d5fc0a476603f8fd77077d2fed9280c1 /libhb/decsrtsub.c
parent4025614015154c8c5cd6239a7a81dec8bcedec55 (diff)
fix srt track stop time
srt stop time was being set to the end of the start chapter instead of the end of the stop chapter. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2843 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decsrtsub.c')
-rw-r--r--libhb/decsrtsub.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/libhb/decsrtsub.c b/libhb/decsrtsub.c
index 0fcb1a035..5c99218e5 100644
--- a/libhb/decsrtsub.c
+++ b/libhb/decsrtsub.c
@@ -249,14 +249,17 @@ static int decsrtInit( hb_work_object_t * w, hb_job_t * job )
retval = 0;
}
}
- chapter = hb_list_item( title->list_chapter, i - 1 );
-
- if( chapter )
+ pv->stop_time = pv->start_time;
+ for( i = job->chapter_start; i <= job->chapter_end; ++i )
{
- pv->stop_time = pv->start_time + chapter->duration;
- } else {
- hb_error( "Could not locate chapter %d for SRT stop time", i );
- retval = 0;
+ chapter = hb_list_item( title->list_chapter, i - 1 );
+ if( chapter )
+ {
+ pv->stop_time += chapter->duration;
+ } else {
+ hb_error( "Could not locate chapter %d for SRT start time", i );
+ retval = 0;
+ }
}
hb_deep_log( 3, "SRT Start time %"PRId64", stop time %"PRId64, pv->start_time, pv->stop_time);