* ts.c: MPEG-II TS Muxer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: ts.c,v 1.39 2003/11/22 20:25:01 fenrir Exp $
+ * $Id: ts.c,v 1.40 2003/11/27 19:39:53 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
int i_pcr_pid;
sout_input_t *p_pcr_input;
- int i_stream_id_mpga;
- int i_stream_id_mpgv;
-
int i_audio_bound;
int i_video_bound;
srand( (uint32_t)mdate() );
- p_sys->i_stream_id_mpga = 0xc0;
- p_sys->i_stream_id_mpgv = 0xe0;
-
p_sys->i_audio_bound = 0;
p_sys->i_video_bound = 0;
case VLC_FOURCC( 'm', 'p','g', 'v' ):
/* TODO: do we need to check MPEG-I/II ? */
p_stream->i_stream_type = 0x02;
- p_stream->i_stream_id = p_sys->i_stream_id_mpgv;
- p_sys->i_stream_id_mpgv++;
+ p_stream->i_stream_id = 0xe0;
break;
case VLC_FOURCC( 'm', 'p','4', 'v' ):
p_stream->i_stream_type = 0x10;
{
case VLC_FOURCC( 'm', 'p','g', 'a' ):
p_stream->i_stream_type = p_input->p_fmt->audio.i_rate >= 32000 ? 0x03 : 0x04;
- p_stream->i_stream_id = p_sys->i_stream_id_mpga;
- p_sys->i_stream_id_mpga++;
+ p_stream->i_stream_id = 0xc0;
break;
case VLC_FOURCC( 'a', '5','2', ' ' ):
p_stream->i_stream_type = 0x81;
* copy.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: copy.c,v 1.20 2003/11/22 20:17:14 fenrir Exp $
+ * $Id: copy.c,v 1.21 2003/11/27 19:39:53 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
p_block = *pp_block;
*pp_block = NULL;
+ if( p_block->i_pts <= 0 )
+ {
+ p_block->i_pts = p_block->i_dts;
+ }
+ else if( p_block->i_dts <= 0 )
+ {
+ p_block->i_dts = p_block->i_pts;
+ }
+
if( p_block->i_pts <= 0 )
{
msg_Dbg( p_dec, "need pts > 0" );