* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: libmpeg2.c,v 1.29 2003/10/01 22:40:39 hartman Exp $
+ * $Id: libmpeg2.c,v 1.30 2003/10/08 21:03:36 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
mtime_t i_pts;
mtime_t i_previous_pts;
mtime_t i_current_pts;
- mtime_t i_period_remainder;
int i_current_rate;
picture_t * p_picture_to_destroy;
vlc_bool_t b_garbage_pic;
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static int OpenDecoder ( vlc_object_t * );
-static int InitDecoder ( decoder_t * );
-static int RunDecoder ( decoder_t *, block_t * );
-static int EndDecoder ( decoder_t * );
+static int OpenDecoder( vlc_object_t * );
+static int InitDecoder( decoder_t * );
+static int RunDecoder ( decoder_t *, block_t * );
+static int EndDecoder ( decoder_t * );
static picture_t *GetNewPicture( decoder_t *, uint8_t ** );
if( p_dec->p_fifo->i_fourcc != VLC_FOURCC('m','p','g','v') &&
p_dec->p_fifo->i_fourcc != VLC_FOURCC('m','p','g','1') &&
- p_dec->p_fifo->i_fourcc != VLC_FOURCC('P','I','M','1') && /* Pinnacle hardware-mpeg1 */
- p_dec->p_fifo->i_fourcc != VLC_FOURCC('V','C','R','2') && /* ATI Video */
+ /* Pinnacle hardware-mpeg1 */
+ p_dec->p_fifo->i_fourcc != VLC_FOURCC('P','I','M','1') &&
+ /* ATI Video */
+ p_dec->p_fifo->i_fourcc != VLC_FOURCC('V','C','R','2') &&
p_dec->p_fifo->i_fourcc != VLC_FOURCC('m','p','g','2') )
{
return VLC_EGENERIC;
p_dec->p_sys->i_pts = mdate() + DEFAULT_PTS_DELAY;
p_dec->p_sys->i_current_pts = 0;
p_dec->p_sys->i_previous_pts = 0;
- p_dec->p_sys->i_period_remainder = 0;
p_dec->p_sys->p_picture_to_destroy = NULL;
p_dec->p_sys->b_garbage_pic = 0;
p_dec->p_sys->b_slice_i = 0;
static picture_t *GetNewPicture( decoder_t *p_dec, uint8_t **pp_buf )
{
decoder_sys_t *p_sys = p_dec->p_sys;
-
picture_t *p_pic;
+
vlc_bool_t b_progressive = p_sys->p_info->current_picture != NULL ?
- p_sys->p_info->current_picture->flags & PIC_FLAG_PROGRESSIVE_FRAME :
- 1;
+ p_sys->p_info->current_picture->flags & PIC_FLAG_PROGRESSIVE_FRAME : 1;
vlc_bool_t b_top_field_first = p_sys->p_info->current_picture != NULL ?
- p_sys->p_info->current_picture->flags & PIC_FLAG_TOP_FIELD_FIRST :
- 1;
+ p_sys->p_info->current_picture->flags & PIC_FLAG_TOP_FIELD_FIRST : 1;
unsigned int i_nb_fields = p_sys->p_info->current_picture != NULL ?
p_sys->p_info->current_picture->nb_fields : 2;
/* Get a new picture */
- while( !(p_pic = vout_CreatePicture( p_sys->p_vout,
- b_progressive, b_top_field_first, i_nb_fields )) )
+ while( !( p_pic = vout_CreatePicture( p_sys->p_vout,
+ b_progressive, b_top_field_first, i_nb_fields ) ) )
{
if( p_dec->p_fifo->b_die || p_dec->p_fifo->b_error )
break;
msleep( VOUT_OUTMEM_SLEEP );
}
- if( p_pic == NULL )
- return NULL;
+
+ if( p_pic == NULL ) return NULL;
+
vout_LinkPicture( p_sys->p_vout, p_pic );
pp_buf[0] = p_pic->p[0].p_pixels;
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.c,v 1.31 2003/09/01 18:30:01 gbazin Exp $
+ * $Id: xcommon.c,v 1.32 2003/10/08 21:03:35 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
case 24:
p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4'); break;
case 32:
- p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4'); break;
+ p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2'); break;
default:
msg_Err( p_vout, "unknown screen depth %i",
p_vout->p_sys->i_screen_depth );