[vlc-commits] packetizer: hevc: don't increment invalid dts
Francois Cartegnie
git at videolan.org
Sat May 20 13:55:44 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat May 20 13:50:55 2017 +0200| [c7b5999db5dd86eb1be58c2e48a37b3d15b56226] | committer: Francois Cartegnie
packetizer: hevc: don't increment invalid dts
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7b5999db5dd86eb1be58c2e48a37b3d15b56226
---
modules/packetizer/hevc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index e983fb8454..b514bb1841 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -728,8 +728,11 @@ static void SetOutputBlockProperties(decoder_t *p_dec, block_t *p_output)
uint8_t i_num_clock_ts = hevc_get_num_clock_ts(p_sys->p_active_sps,
p_sys->p_timing);
const mtime_t i_start = date_Get(&p_sys->dts);
- date_Increment(&p_sys->dts, i_num_clock_ts);
- p_output->i_length = date_Get(&p_sys->dts) - i_start;
+ if( i_start != VLC_TS_INVALID )
+ {
+ date_Increment(&p_sys->dts, i_num_clock_ts);
+ p_output->i_length = date_Get(&p_sys->dts) - i_start;
+ }
p_sys->pts = VLC_TS_INVALID;
}
hevc_release_sei_pic_timing(p_sys->p_timing);
More information about the vlc-commits
mailing list