[vlc-commits] demux/subtitle: Fix wrong ASS header parsing
David Fuhrmann
git at videolan.org
Mon Jan 12 08:35:44 CET 2015
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Jan 12 08:32:54 2015 +0100| [feb92ccef60546bfdfdae074eb99cd019ca7aad2] | committer: David Fuhrmann
demux/subtitle: Fix wrong ASS header parsing
After optimization in 6cccd64dacf431e1c33877e131b09ff906c85972,
complete ASS header was discarded for some subtitles.
close #12733
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=feb92ccef60546bfdfdae074eb99cd019ca7aad2
---
modules/demux/subtitle.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 1b22c7d..d8b6dc5 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