* video.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.37 2003/08/08 17:08:32 gbazin Exp $
+ * $Id: video.c,v 1.38 2003/08/09 19:49:13 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
p_pic = (picture_t *)p_vdec->p_ff_pic->opaque;
}
- /* Set the PTS */
- if( p_vdec->p_ff_pic->pts )
+ /* Set the PTS
+ * There is an ugly hack here because some demuxers pass us a dts instead
+ * of a pts so this screw up things for streams with B frames. */
+ if( p_vdec->p_ff_pic->pts &&
+ ( !p_vdec->p_context->has_b_frames ||
+ p_vdec->p_ff_pic->pict_type == FF_B_TYPE ) )
{
p_vdec->pts = p_vdec->p_ff_pic->pts;
}
* ogg.c : ogg stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: ogg.c,v 1.29 2003/07/09 22:10:13 gbazin Exp $
+ * $Id: ogg.c,v 1.30 2003/08/09 19:49:13 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
p_data->p_payload_end = p_data->p_payload_start + p_oggpacket->bytes;
/* Convert the pcr into a pts */
- if( p_stream->i_cat != SPU_ES )
+ if( p_stream->i_fourcc == VLC_FOURCC( 'v','o','r','b' ) ||
+ p_stream->i_fourcc == VLC_FOURCC( 't','h','e','o' ) )
{
p_pes->i_pts = ( p_stream->i_pcr < 0 ) ? 0 :
input_ClockGetTS( p_input, p_input->stream.p_selected_program,