summaryrefslogtreecommitdiffstats
path: root/libhb/decssasub.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-06-27 16:54:11 -0700
committerJohn Stebbins <[email protected]>2016-06-27 16:54:11 -0700
commit05c142a4e8bdc81a91367ff535e8775141f8b6ff (patch)
tree55c7c9a8afaa6385be1200704cdd6cf2a1ccffa1 /libhb/decssasub.c
parent1ac26fb371c869e9b15083ea2274e119022a1400 (diff)
decssasub: fix ssa start times when p-to-p is used
Diffstat (limited to 'libhb/decssasub.c')
-rw-r--r--libhb/decssasub.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libhb/decssasub.c b/libhb/decssasub.c
index 98f62d4fe..e03c71fe8 100644
--- a/libhb/decssasub.c
+++ b/libhb/decssasub.c
@@ -227,7 +227,7 @@ void hb_ssa_style_init(hb_subtitle_style_t *style)
}
static hb_buffer_t *
-ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, int scr_sequence,
+ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, hb_buffer_t * in,
uint8_t *in_data, int in_size );
/*
@@ -258,7 +258,7 @@ static hb_buffer_t *ssa_decode_packet( hb_work_object_t * w, hb_buffer_t *in )
continue;
// Decode an individual SSA line
- buf = ssa_decode_line_to_mkv_ssa(w, in->s.scr_sequence,
+ buf = ssa_decode_line_to_mkv_ssa(w, in,
(uint8_t *)curLine, strlen(curLine));
hb_buffer_list_append(&list, buf);
}
@@ -323,7 +323,7 @@ static uint8_t *find_field( uint8_t *pos, uint8_t *end, int fieldNum )
* 1 2 3 4 5 6 7 8 9
*/
static hb_buffer_t *
-ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, int scr_sequence,
+ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, hb_buffer_t * in,
uint8_t *in_data, int in_size )
{
hb_work_private_t * pv = w->private_data;
@@ -373,9 +373,10 @@ ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, int scr_sequence,
out->size = strlen(mkvIn) + 1;
out->s.frametype = HB_FRAME_SUBTITLE;
- out->s.start = in_start;
- out->s.stop = in_stop;
- out->s.scr_sequence = scr_sequence;
+ out->s.start = in->s.start;
+ out->s.duration = in_stop - in_start;
+ out->s.stop = in->s.start + out->s.duration;
+ out->s.scr_sequence = in->s.scr_sequence;
if( out->size == 0 )
{