Skip to content

Commit

Permalink
dectx3gsub: properly increment the line count, each SSA line in MKV (…
Browse files Browse the repository at this point in the history
…and in libass) requires an unique ReadOrder number. Fix a regression introduced in c72bb7d that was breaking burned subtitles and the creation of incorrect MKV files when the source subtitles were in the tx3g format.
  • Loading branch information
galad87 committed Jan 24, 2024
1 parent 11ca508 commit 699c880
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libhb/dectx3gsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static hb_buffer_t *tx3g_decode_to_ssa(hb_work_private_t *pv, hb_buffer_t *in)
int charIndex = 0;
int styleIndex = 0;

snprintf((char*)dst, maxOutputSize, "%d,,Default,,0,0,0,,", pv->line);
snprintf((char*)dst, maxOutputSize, "%d,0,Default,,0,0,0,,", pv->line);
dst += strlen((char*)dst);
start = dst;
for (pos = text, end = text + textLength; pos < end; pos++)
Expand Down Expand Up @@ -219,6 +219,8 @@ static hb_buffer_t *tx3g_decode_to_ssa(hb_work_private_t *pv, hb_buffer_t *in)
*dst = '\0';
dst++;

pv->line++;

// Trim output buffer to the actual amount of data written
out->size = dst - out->data;

Expand Down

0 comments on commit 699c880

Please sign in to comment.