Commit 90919e24 authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

demux: ts: reset buffers on seek and flag discontinuity

Close #14078
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a060374a
......@@ -2025,6 +2025,29 @@ static int Seek( demux_t *p_demux, double f_percent )
}
else
{
for( int i = 2; i < 8192; i++ )
{
ts_pid_t *pid = &p_sys->pid[i];
if( !pid->b_valid || !pid->es || !pid->es->id )
continue;
if( pid->es->p_data )
{
block_ChainRelease( pid->es->p_data );
pid->es->p_data = NULL;
pid->es->i_data_size = 0;
pid->es->i_data_gathered = 0;
pid->es->pp_last = &pid->es->p_data;
}
block_t *p_reset = block_Alloc(1);
if( p_reset )
{
p_reset->i_buffer = 0;
p_reset->i_flags = BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED;
es_out_Send( p_demux->out, pid->es->id, p_reset );
}
}
msg_Dbg( p_demux, "Seek():can find a time position. i_cnt:%d", i_cnt );
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