Commit 719151d2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Support for multiple lines in PJS subs.

parent b3524a50
...@@ -1353,6 +1353,7 @@ static int ParsePJS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx ) ...@@ -1353,6 +1353,7 @@ static int ParsePJS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt; text_t *txt = &p_sys->txt;
char *psz_text; char *psz_text;
int i;
for( ;; ) for( ;; )
{ {
...@@ -1379,6 +1380,14 @@ static int ParsePJS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx ) ...@@ -1379,6 +1380,14 @@ static int ParsePJS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
} }
free( psz_text ); free( psz_text );
} }
/* replace | by \n */
for( i = 0; psz_text[i] != '\0'; i++ )
{
if( psz_text[i] == '|' )
psz_text[i] = '\n';
}
p_subtitle->psz_text = psz_text; p_subtitle->psz_text = psz_text;
msg_Dbg( p_demux, "%s", psz_text ); msg_Dbg( p_demux, "%s", psz_text );
return VLC_SUCCESS; return VLC_SUCCESS;
......
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