Commit 5d75b486 authored by Francois Cartegnie's avatar Francois Cartegnie

codec: cc: clear screen and buffers on discontinuity

parent 3b60c9da
......@@ -250,6 +250,17 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
if( !p_sys->p_block )
p_sys->p_block = Pop( p_dec );
/* Reset decoder if needed */
if( p_sys->p_block &&
(p_sys->p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED)) )
{
Eia608Init( &p_sys->eia608 );
p_sys->i_display_time = VLC_TS_INVALID;
/* clear flags, as we might process it more than once */
p_sys->p_block->i_flags ^= (BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED);
continue;
}
if( !p_sys->p_block )
break;
......
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