]> granicus.if.org Git - handbrake/commitdiff
tx3g: remove 2 line limit
authorJohn Stebbins <jstebbins@jetheaddev.com>
Mon, 12 Oct 2015 17:04:26 +0000 (10:04 -0700)
committerJohn Stebbins <jstebbins@jetheaddev.com>
Mon, 12 Oct 2015 17:04:26 +0000 (10:04 -0700)
This is no longer a problem with new versions of iOS and QuickTime

libhb/muxcommon.c

index afda745bee9be60bc9f5a8e64e0f677d5806e146..b2842acfa32790b0fe733fd0ffd49ae811830bb1 100644 (file)
@@ -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);