Commit 1c55bfd9 authored by François Cartegnie's avatar François Cartegnie 🤞

packetizer: mpegaudio: forward discontinuities

parent 163331aa
......@@ -330,6 +330,8 @@ static block_t *PacketizeRawBlock(decoder_t *p_dec, block_t **pp_block)
return NULL;
} else if (p_block->i_pts > VLC_TS_INVALID &&
p_block->i_pts != date_Get(&p_sys->end_date)) {
if(date_Get(&p_sys->end_date) > 0)
p_sys->b_discontuinity = true;
date_Set(&p_sys->end_date, p_block->i_pts);
}
......
......@@ -558,6 +558,12 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( p_sys->i_pts == p_sys->bytestream.p_block->i_pts )
p_sys->i_pts = p_sys->bytestream.p_block->i_pts = VLC_TS_INVALID;
if( p_sys->b_discontinuity )
{
p_out_buffer->i_flags |= BLOCK_FLAG_DISCONTINUITY;
p_sys->b_discontinuity = false;
}
/* So p_block doesn't get re-added several times */
p_block = block_BytestreamPop( &p_sys->bytestream );
if (pp_block)
......
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