Commit feb92cce authored by David Fuhrmann's avatar David Fuhrmann

demux/subtitle: Fix wrong ASS header parsing

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

close #12733
parent 0a865ddb
...@@ -1156,6 +1156,9 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle, ...@@ -1156,6 +1156,9 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
free( psz_text ); free( psz_text );
/* All the other stuff we add to the header field */ /* 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 ); size_t s_len = strlen( s );
p_sys->psz_header = realloc_or_free( p_sys->psz_header, header_len + s_len + 2 ); p_sys->psz_header = realloc_or_free( p_sys->psz_header, header_len + s_len + 2 );
if( !p_sys->psz_header ) 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