Commit b45a95e1 authored by François Cartegnie's avatar François Cartegnie 🤞

packetizer: hevc: fix timestamp propagation

next sync nal timestamp was not used
parent 279d76fb
...@@ -748,13 +748,11 @@ static block_t *ParseNALBlock(decoder_t *p_dec, bool *pb_ts_used, block_t *p_fra ...@@ -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_sys->b_need_ts)
{ {
if(p_frag->i_dts > VLC_TS_INVALID) if(p_frag->i_dts > VLC_TS_INVALID)
{
date_Set(&p_sys->dts, p_frag->i_dts); date_Set(&p_sys->dts, p_frag->i_dts);
*pb_ts_used = true;
}
p_sys->pts = p_frag->i_pts; p_sys->pts = p_frag->i_pts;
if(date_Get( &p_sys->dts ) != VLC_TS_INVALID) if(date_Get( &p_sys->dts ) != VLC_TS_INVALID)
p_sys->b_need_ts = false; p_sys->b_need_ts = false;
*pb_ts_used = true;
} }
if(unlikely(p_frag->i_buffer < 5)) if(unlikely(p_frag->i_buffer < 5))
...@@ -789,8 +787,11 @@ static block_t *ParseNALBlock(decoder_t *p_dec, bool *pb_ts_used, block_t *p_fra ...@@ -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); p_output = GatherAndValidateChain(p_output);
if(p_output) if(p_output)
{ {
p_sys->b_need_ts = true;
SetOutputBlockProperties( p_dec, p_output ); 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; return p_output;
......
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