X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fdemux%2Fsubtitle.c;h=d8b6dc51504ee380b3425433c8af9bb77217e670;hb=feb92ccef60546bfdfdae074eb99cd019ca7aad2;hp=1b22c7db4756a629a91d8ed93f3f478e209d342a;hpb=0a865ddbc82e9ab5ebc297dc56e515f80bc30adb;p=vlc diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c index 1b22c7db47..d8b6dc5150 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 )