summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-10-13 11:08:57 -0700
committerJohn Stebbins <[email protected]>2015-10-13 11:08:57 -0700
commitb55283f070e2883bacbc2e525255ed384a89401e (patch)
tree2d8bdb4b436e8640eb6276a8c145a978c096ce32
parentf595da9c952df3ce90b169a245dcd712a8a58be0 (diff)
parentfc5e085281872c374aaefd2121b306a6f1bbf7c2 (diff)
Merge pull request #17 from jstebbins/multiline-tx3g
tx3g: remove 2 line limit
-rw-r--r--libhb/muxcommon.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c
index afda745be..b2842acfa 100644
--- a/libhb/muxcommon.c
+++ b/libhb/muxcommon.c
@@ -783,7 +783,7 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input,
uint8_t *style_atoms, uint16_t *stylesize)
{
uint16_t utf8_count = 0; // utf8 count from start of subtitle
- int consumed, in_pos = 0, out_pos = 0, len, ii, lines;
+ int consumed, in_pos = 0, out_pos = 0, len, ii;
style_context_t ctx;
hb_subtitle_style_t style;
char *text, *tmp;
@@ -806,7 +806,6 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input,
while (input[in_pos] != '\0')
{
- lines = 1;
text = hb_ssa_to_text((char*)input + in_pos, &consumed, &style);
if (text == NULL)
break;
@@ -821,18 +820,6 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input,
hb_deep_log( 3, "mux: Counted %d UTF-8 chrs within subtitle",
utf8_count);
}
- // By default tx3g only supports 2 lines of text
- // To support more lines, we must enable the virtical placement
- // flag in the tx3g atom and add tbox atoms to the sample
- // data to set the vertical placement for each subtitle.
- // Although tbox defines a rectangle, the QT spec says
- // that only the vertical placement is honored (bummer).
- if (text[ii] == '\n')
- {
- lines++;
- if (lines > 2)
- text[ii] = ' ';
- }
len++;
}
strcpy((char*)output+out_pos, text);