[vlc-devel] [PATCH 1/3] packetizer:copy: handle the BLOCK_FLAG_DISCONTINUITY
Steve Lhomme
robux4 at videolabs.io
Tue Nov 17 10:18:11 CET 2015
---
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;
--
2.6.2
More information about the vlc-devel
mailing list