From 694b417b8c9950a4131eaa7e36e856bb1ea5ceee Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Wed, 21 Apr 2004 16:00:17 +0000 Subject: [PATCH] * modules/packetizer/mpegvideo.c: When a discontinuity is flagged, trash the whole PES because the contents may be corrupt. --- modules/packetizer/mpegvideo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c index 4857e21a17..5c7f9cbf0f 100644 --- a/modules/packetizer/mpegvideo.c +++ b/modules/packetizer/mpegvideo.c @@ -2,7 +2,7 @@ * mpegvideo.c: parse and packetize an MPEG1/2 video stream ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: mpegvideo.c,v 1.31 2004/03/03 11:09:30 massiot Exp $ + * $Id$ * * Authors: Laurent Aimar * Eric Petit @@ -211,12 +211,14 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block ) return NULL; } - if( (*pp_block)->i_flags&BLOCK_FLAG_DISCONTINUITY ) + if( (*pp_block)->i_flags & BLOCK_FLAG_DISCONTINUITY ) { p_sys->i_state = STATE_NOSYNC; if( p_sys->p_frame ) block_ChainRelease( p_sys->p_frame ); p_sys->p_frame = NULL; p_sys->b_frame_slice = VLC_FALSE; + block_Release( *pp_block ); + return NULL; } block_BytestreamPush( &p_sys->bytestream, *pp_block ); -- 2.39.2