Commit 830274e9 authored by François Cartegnie's avatar François Cartegnie 🤞

packetizer: mpegaudio: fully rebuild dts/pts with dvrms

parent 9ffbb0c9
......@@ -996,7 +996,6 @@ static int DemuxInit( demux_t *p_demux )
{
/* DVR-MS special ASF */
fmt.i_codec = VLC_CODEC_MPGV;
fmt.i_original_fourcc = VLC_FOURCC( 'D','V','R',' ');
}
if( p_sp->i_type_specific_data_length > 11 +
......@@ -1128,7 +1127,16 @@ static int DemuxInit( demux_t *p_demux )
es_format_Init( &fmt, UNKNOWN_ES, 0 );
}
fmt.b_packetized = !b_dvrms;
if( b_dvrms )
{
fmt.i_original_fourcc = VLC_FOURCC( 'D','V','R',' ');
fmt.b_packetized = false;
}
else
{
fmt.b_packetized = true;
}
tk->i_cat = tk->info.i_cat = fmt.i_cat;
if( fmt.i_cat != UNKNOWN_ES )
{
......
......@@ -347,7 +347,15 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( p_sys->i_pts > VLC_TS_INVALID &&
p_sys->i_pts != date_Get( &p_sys->end_date ) )
{
date_Set( &p_sys->end_date, p_sys->i_pts );
if( p_dec->fmt_in.i_original_fourcc == VLC_FOURCC( 'D','V','R',' ') )
{
if( date_Get( &p_sys->end_date ) == VLC_TS_INVALID )
date_Set( &p_sys->end_date, p_sys->i_pts );
}
else if ( p_sys->i_pts != date_Get( &p_sys->end_date ) )
{
date_Set( &p_sys->end_date, p_sys->i_pts );
}
}
p_sys->i_state = STATE_HEADER;
......
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