summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-01-21 11:08:35 -0700
committerJohn Stebbins <[email protected]>2016-01-21 11:08:35 -0700
commitef956e695879c716dc22c96f7f8fa24e3fa5d08c (patch)
treedff798b5baf071a1742393f3872176ff1045dbea /libhb
parent254b1fac8bb35bb29688560dbc8a3811be652f36 (diff)
sync: fix hang in ssa subtitle sync
Failed to pass along EOF buffer.
Diffstat (limited to 'libhb')
-rw-r--r--libhb/sync.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index 9272d30d3..23e96a964 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -1515,7 +1515,7 @@ static hb_buffer_t * mergeSubtitles(subtitle_sanitizer_t *sanitizer)
}
// We only reach here if we are merging subtitles
- while (hb_buffer_list_count(&sanitizer->list_current) > 1)
+ while (hb_buffer_list_count(&sanitizer->list_current) > 0)
{
a = hb_buffer_list_head(&sanitizer->list_current);
if (a->s.flags & HB_BUF_FLAG_EOF)
@@ -1525,6 +1525,10 @@ static hb_buffer_t * mergeSubtitles(subtitle_sanitizer_t *sanitizer)
break;
}
b = a->next;
+ if (b == NULL)
+ {
+ break;
+ }
if (b->s.flags & HB_BUF_FLAG_EOF)
{
buf = hb_buffer_list_rem_head(&sanitizer->list_current);