Commit 662b0e8e authored by François Cartegnie's avatar François Cartegnie 🤞

codec: faad: flush buffer on decoder flush

parent 21a746d4
......@@ -197,16 +197,6 @@ static int Open( vlc_object_t *p_this )
return VLC_SUCCESS;
}
/*****************************************************************************
* Flush:
*****************************************************************************/
static void Flush( decoder_t *p_dec )
{
decoder_sys_t *p_sys = p_dec->p_sys;
date_Set( &p_sys->date, 0 );
}
/*****************************************************************************
* FlushBuffer:
*****************************************************************************/
......@@ -234,6 +224,17 @@ static void FlushBuffer( decoder_sys_t *p_sys, size_t i_used )
}
}
/*****************************************************************************
* Flush:
*****************************************************************************/
static void Flush( decoder_t *p_dec )
{
decoder_sys_t *p_sys = p_dec->p_sys;
date_Set( &p_sys->date, VLC_TS_INVALID );
FlushBuffer( p_sys, SIZE_MAX );
}
/*****************************************************************************
* DecodeBlock:
*****************************************************************************/
......@@ -400,8 +401,8 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
}
}
/* Flush the buffer */
FlushBuffer( p_sys, SIZE_MAX );
Flush( p_dec );
return VLCDEC_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