diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index 63cd09793926e6dfdd0ad1c940b7daab34a2bc3f..ce3c81d5f3569ec8b94051d36d6e31511fda82ee 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -2,7 +2,7 @@ * 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 * Eric Petit @@ -185,9 +185,6 @@ struct sout_mux_sys_t 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; @@ -269,9 +266,6 @@ static int Open( vlc_object_t *p_this ) 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; @@ -430,8 +424,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) 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; @@ -467,8 +460,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) { 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; diff --git a/modules/packetizer/copy.c b/modules/packetizer/copy.c index ad4cc18ff0ba5d31508c35391b4ae3f46d94be17..057e970c79e22b7554a525e63036d966fccc8d14 100644 --- a/modules/packetizer/copy.c +++ b/modules/packetizer/copy.c @@ -2,7 +2,7 @@ * 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 * Eric Petit @@ -261,6 +261,15 @@ static block_t *Packetize ( decoder_t *p_dec, block_t **pp_block ) 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" );