Commit a9ddba27 authored by Laurent Aimar's avatar Laurent Aimar

* ts: for MSCODEC in TS, set pts == dts when pts <= 0.

 (The problem is that if pts is always 0, no time information
 will be written, making stream unplayable).

 * pes: cosmetics.
parent 75db1bab
......@@ -234,7 +234,7 @@ int E_( EStoPES )( sout_instance_t *p_sout,
int i_stream_id,
int b_mpeg2 )
{
block_t *p_es_sav, *p_pes;
block_t *p_pes;
mtime_t i_pts, i_dts, i_length;
uint8_t *p_data;
......@@ -262,7 +262,6 @@ int E_( EStoPES )( sout_instance_t *p_sout,
p_data = p_es->p_buffer;
*pp_pes = p_pes = NULL;
p_es_sav = p_es;
do
{
......@@ -315,7 +314,6 @@ int E_( EStoPES )( sout_instance_t *p_sout,
i_dts += i_length;
}
(*pp_pes)->i_flags = p_es_sav->i_flags;
return( 0 );
}
......
......@@ -847,6 +847,11 @@ static int Mux( sout_mux_t *p_mux )
}
/* Convert to pes */
if( p_stream->i_stream_id == 0xa0 && p_data->i_pts <= 0 )
{
/* XXX yes I know, it's awfull, but it's needed, so don't remove it ... */
p_data->i_pts = p_data->i_dts;
}
E_( EStoPES )( p_mux->p_sout, &p_data, p_data, p_stream->i_stream_id, 1 );
BufferChainAppend( &p_stream->chain_pes, p_data );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment