* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: libmpeg2.c,v 1.10 2003/04/15 15:53:42 gbazin Exp $
+ * $Id: libmpeg2.c,v 1.11 2003/04/20 12:59:01 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
mpeg2_set_buf( p_dec->p_mpeg2dec, buf, NULL );
p_dec->p_synchro = vout_SynchroInit( p_dec->p_fifo, p_dec->p_vout,
- 1000000 * 27 / p_dec->p_info->sequence->frame_period * 1001 );
+ 1001 * 100 * 27 / p_dec->p_info->sequence->frame_period * 10000 );
}
break;
mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
}
}
- /* pass-through */
+ break;
case STATE_END:
+ case STATE_SLICE:
if( p_dec->p_info->display_fbuf
&& p_dec->p_info->display_fbuf->id )
{
p_dec->p_info->display_picture->flags
& PIC_MASK_CODING_TYPE,
1 );
- vout_DestroyPicture( p_dec->p_vout, p_pic );
+ vout_DatePicture( p_dec->p_vout, p_pic, 0 );
+ vout_DisplayPicture( p_dec->p_vout, p_pic );
}
}
- if( p_dec->p_info->discard_fbuf &&
- p_dec->p_info->discard_fbuf->id )
- {
- vout_UnlinkPicture( p_dec->p_vout, p_pic );
- }
+ }
+
+ if( p_dec->p_info->discard_fbuf &&
+ p_dec->p_info->discard_fbuf->id )
+ {
+ p_pic = (picture_t *)p_dec->p_info->discard_fbuf->id;
+ vout_UnlinkPicture( p_dec->p_vout, p_pic );
}
break;
case STATE_INVALID:
- msg_Warn( p_dec->p_fifo, "Received STATE_INVALID" );
+ msg_Warn( p_dec->p_fifo, "invalid picture encountered" );
break;
default:
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: synchro.c,v 1.7 2003/01/23 21:47:59 massiot Exp $
+ * $Id: synchro.c,v 1.8 2003/04/20 12:59:01 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
p_vpar->synchro.current_pts += p_vpar->synchro.i_current_period
* (period >> 1);
-#define PTS_THRESHOLD (period >> 2)
+#define PTS_THRESHOLD (period >> 2)
if( i_coding_type == B_CODING_TYPE )
{
/* A video frame can be displayed 1, 2 or 3 times, according to
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.36 2003/03/28 17:02:25 gbazin Exp $
+ * $Id: vout_pictures.c,v 1.37 2003/04/20 12:59:02 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
if( p_pic->i_refcount < 0 )
{
- msg_Err( p_vout, "picture refcount is %i", p_pic->i_refcount );
+ msg_Err( p_vout, "picture %p refcount is %i",
+ p_pic, p_pic->i_refcount );
p_pic->i_refcount = 0;
}