[vlc-commits] demux/subtitle: Fix wrong ASS header parsing

David Fuhrmann git at videolan.org
Tue Jan 13 19:05:04 CET 2015


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Jan 12 08:32:54 2015 +0100| [ce3de59fc11b120789ae76e807388476a54d3993] | committer: Felix Paul Kühne

demux/subtitle: Fix wrong ASS header parsing

After optimization in 6cccd64dacf431e1c33877e131b09ff906c85972,
complete ASS header was discarded for some subtitles.

close #12733

(cherry picked from commit feb92ccef60546bfdfdae074eb99cd019ca7aad2)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

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

 modules/demux/subtitle.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index c2a7642..c2877a0 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1156,6 +1156,9 @@ static int  ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
         free( psz_text );
 
         /* All the other stuff we add to the header field */
+        if( header_len == 0 && p_sys->psz_header )
+            header_len = strlen( p_sys->psz_header );
+
         size_t s_len = strlen( s );
         p_sys->psz_header = realloc_or_free( p_sys->psz_header, header_len + s_len + 2 );
         if( !p_sys->psz_header )



More information about the vlc-commits mailing list