[vlc-devel] [PATCH 1/3] packetizer:copy: handle the BLOCK_FLAG_DISCONTINUITY
Rémi Denis-Courmont
remi at remlab.net
Tue Nov 17 10:20:41 CET 2015
You seem to confuse discontinuity and flush. C.f. recent discussions.
Le 2015-11-17 12:18, Steve Lhomme a écrit :
> ---
> modules/packetizer/copy.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/modules/packetizer/copy.c b/modules/packetizer/copy.c
> index bc3a623..5882beb 100644
> --- a/modules/packetizer/copy.c
> +++ b/modules/packetizer/copy.c
> @@ -144,6 +144,16 @@ static block_t *Packetize ( decoder_t *p_dec,
> block_t **pp_block )
>
> if( pp_block == NULL || *pp_block == NULL )
> return NULL;
> +
> + if( (*pp_block)->i_flags&(BLOCK_FLAG_DISCONTINUITY) )
> + {
> + if (p_ret != NULL)
> + {
> + block_ChainRelease( p_ret );
> + p_ret = NULL;
> + p_dec->p_sys->p_block = NULL;
> + }
> + }
> if( (*pp_block)->i_flags&(BLOCK_FLAG_CORRUPTED) )
> {
> block_Release( *pp_block );
> @@ -186,7 +196,7 @@ static block_t *PacketizeSub( decoder_t *p_dec,
> block_t **pp_block )
>
> if( pp_block == NULL || *pp_block == NULL )
> return NULL;
> - if( (*pp_block)->i_flags&(BLOCK_FLAG_CORRUPTED) )
> + if(
> (*pp_block)->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED)
> )
> {
> block_Release( *pp_block );
> return NULL;
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list