]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/video.c: temporary hack to work around demuxers that set the...
authorGildas Bazin <gbazin@videolan.org>
Sat, 9 Aug 2003 19:49:13 +0000 (19:49 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sat, 9 Aug 2003 19:49:13 +0000 (19:49 +0000)
* modules/demux/ogg.c: don't try anymore to send interpolated pts to ffmpeg.

modules/codec/ffmpeg/video.c
modules/demux/ogg.c

index ab793e3306619fd3e45cd40953e54dd8755ad0a3..afc9086f0da6d0169c618cd7e92c1c5b3b91cd5e 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
@@ -585,8 +585,12 @@ usenextdata:
         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;
     }
index 8bde289fd6e2d5d67a841e14545e767f5457cfc3..f798316fa5c58abf19219e627442391d1a0c0d89 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  * 
@@ -421,7 +421,8 @@ static void Ogg_DecodePacket( input_thread_t *p_input,
     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,