Commit a4ee4477 authored by Gildas Bazin's avatar Gildas Bazin

* include/vlc_block.h, modules/codec/libmpeg2.c: re-added the discontinuity flag in block_t and re-enabled the discontinuity gestion in the libmpeg2 codec.
* include/vlc_block_helper.h: implemented bytestream reading helper functions for chained blocks.
* modules/codec/a52.c: modified to use the bytestream reading functions.
  The flexibility added by these functions makes the code simpler and better at detecting synchro code emulations.
parent ebc29b88
......@@ -2,7 +2,7 @@
* vlc_block.h: Data blocks management functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlc_block.h,v 1.2 2003/09/02 20:19:25 gbazin Exp $
* $Id: vlc_block.h,v 1.3 2003/09/30 20:23:03 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -38,6 +38,8 @@ struct block_t
mtime_t i_pts;
mtime_t i_dts;
vlc_bool_t b_discontinuity; /* only temporary */
int i_buffer;
uint8_t *p_buffer;
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: libmpeg2.c,v 1.27 2003/09/03 10:23:17 gbazin Exp $
* $Id: libmpeg2.c,v 1.28 2003/09/30 20:23:03 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -193,12 +193,11 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block )
return VLC_SUCCESS;
}
#if 0
if( p_pes->b_discontinuity && p_sys->p_synchro
if( p_block->b_discontinuity && p_sys->p_synchro
&& p_sys->p_info->sequence->width != (unsigned)-1 )
{
vout_SynchroReset( p_sys->p_synchro );
if ( p_sys->p_info->current_fbuf != NULL
if( p_sys->p_info->current_fbuf != NULL
&& p_sys->p_info->current_fbuf->id != NULL )
{
p_sys->b_garbage_pic = 1;
......@@ -232,7 +231,6 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block )
vout_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
}
}
#endif
if( p_block->i_pts )
{
......
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