Commit ce3de59f authored by David Fuhrmann's avatar David Fuhrmann Committed by 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: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 1289de9a
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment