[vlc-devel] [PATCH 13/19] ttml demux: fix parseHead fonction

Stanislas Plessia stplessia at gmail.com
Mon Aug 29 16:01:11 CEST 2016


In case the begin and end head tag are in the first
buffer, the formula for the head length was wrong.
---
 modules/demux/ttml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 713bcae..4f57f67 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -606,7 +606,7 @@ static void ParseHead( demux_t* p_demux )
                 {
                     // If the buffer we originally copied already contains the end tag, no need to copy again
                     // Though if we already have the </head> in our buffer, we need to adjust the total size
-                    i_head_len = psz_end_head - buff + i_end_tag_len + i_offset;
+                    i_head_len = psz_end_head - buff + i_end_tag_len - i_offset;
                 }
                 psz_head[i_head_len] = 0;
                 p_sys->psz_head = psz_head;
-- 
2.7.4



More information about the vlc-devel mailing list