[vlc-commits] fluidsynth: fix initial invalid timestamp
Rémi Denis-Courmont
git at videolan.org
Wed May 2 16:26:03 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 2 17:25:35 2018 +0300| [1f85564561f4dfaf535dfd10ae76f814c4572ace] | committer: Rémi Denis-Courmont
fluidsynth: fix initial invalid timestamp
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f85564561f4dfaf535dfd10ae76f814c4572ace
---
modules/codec/fluidsynth.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/codec/fluidsynth.c b/modules/codec/fluidsynth.c
index 965f198fc7..41f597946f 100644
--- a/modules/codec/fluidsynth.c
+++ b/modules/codec/fluidsynth.c
@@ -174,7 +174,7 @@ static int Open (vlc_object_t *p_this)
p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
p_dec->fmt_out.audio.i_bitspersample = 32;
date_Init (&p_sys->end_date, p_dec->fmt_out.audio.i_rate, 1);
- date_Set (&p_sys->end_date, 0);
+ date_Set(&p_sys->end_date, VLC_TS_INVALID);
p_dec->p_sys = p_sys;
p_dec->pf_decode = DecodeBlock;
@@ -223,7 +223,8 @@ static int DecodeBlock (decoder_t *p_dec, block_t *p_block)
}
}
- if (p_block->i_pts > VLC_TS_INVALID && !date_Get (&p_sys->end_date))
+ if (p_block->i_pts != VLC_TS_INVALID
+ && date_Get(&p_sys->end_date) == VLC_TS_INVALID)
date_Set (&p_sys->end_date, p_block->i_pts);
else
if (p_block->i_pts < date_Get (&p_sys->end_date))
More information about the vlc-commits
mailing list