[vlc-commits] ttml demux: fix parseHead fonction

Stanislas Plessia git at videolan.org
Wed Sep 14 18:39:44 CEST 2016


vlc | branch: master | Stanislas Plessia <stplessia at gmail.com> | Mon Aug 29 16:01:11 2016 +0200| [5fe477d1004f9fb4ae51c451dd3f9db2caed7672] | committer: Hugo Beauzée-Luyssen

ttml demux: fix parseHead fonction

In case the begin and end head tag are in the first
buffer, the formula for the head length was wrong.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5fe477d1004f9fb4ae51c451dd3f9db2caed7672
---

 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 8a82574..323f813 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -604,7 +604,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;



More information about the vlc-commits mailing list