Skip to content

Commit

Permalink
packetizer: hevc: fix timestamp propagation
Browse files Browse the repository at this point in the history
next sync nal timestamp was not used
  • Loading branch information
fcartegnie committed May 12, 2017
1 parent 279d76f commit b45a95e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/packetizer/hevc.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,11 @@ static block_t *ParseNALBlock(decoder_t *p_dec, bool *pb_ts_used, block_t *p_fra
if(p_sys->b_need_ts)
{
if(p_frag->i_dts > VLC_TS_INVALID)
{
date_Set(&p_sys->dts, p_frag->i_dts);
*pb_ts_used = true;
}
p_sys->pts = p_frag->i_pts;
if(date_Get( &p_sys->dts ) != VLC_TS_INVALID)
p_sys->b_need_ts = false;
*pb_ts_used = true;
}

if(unlikely(p_frag->i_buffer < 5))
Expand Down Expand Up @@ -789,8 +787,11 @@ static block_t *ParseNALBlock(decoder_t *p_dec, bool *pb_ts_used, block_t *p_fra
p_output = GatherAndValidateChain(p_output);
if(p_output)
{
p_sys->b_need_ts = true;
SetOutputBlockProperties( p_dec, p_output );
if(p_frag->i_dts > VLC_TS_INVALID)
date_Set(&p_sys->dts, p_frag->i_dts);
p_sys->pts = p_frag->i_pts;
*pb_ts_used = true;
}

return p_output;
Expand Down

0 comments on commit b45a95e

Please sign in to comment.