Commit a410f1a0 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Vobsub: allow empty id language

Close #5525
parent 3f17ad71
......@@ -522,8 +522,16 @@ static int ParseVobSubIDX( demux_t *p_demux )
/* Lets start a new track */
if( sscanf( line, "id: %32[^ ,], index: %d",
language, &i_track_id ) == 2 )
language, &i_track_id ) != 2 )
{
if( sscanf( line, "id: , index: %d", &i_track_id ) != 1 )
{
msg_Warn( p_demux, "reading new track failed" );
continue;
}
language[0] = '\0';
}
p_sys->i_tracks++;
p_sys->track = xrealloc( p_sys->track,
sizeof( vobsub_track_t ) * (p_sys->i_tracks + 1 ) );
......@@ -550,11 +558,6 @@ static int ParseVobSubIDX( demux_t *p_demux )
current_tk->p_es = es_out_Add( p_demux->out, &fmt );
msg_Dbg( p_demux, "new vobsub track detected" );
}
else
{
msg_Warn( p_demux, "reading new track failed" );
}
}
else if( !strncmp( line, "timestamp:", 10 ) )
{
/*
......
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