[vlc-commits] core: use vlc_tick_from_samples()
Steve Lhomme
git at videolan.org
Thu Sep 20 16:16:08 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 20 14:35:20 2018 +0200| [cc09e6abf86fb76d6a1edfd783f3b8bec1964537] | committer: Steve Lhomme
core: use vlc_tick_from_samples()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc09e6abf86fb76d6a1edfd783f3b8bec1964537
---
src/audio_output/dec.c | 4 ++--
src/stream_output/sap.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 79bf91bc3f..a934b774ba 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -352,8 +352,8 @@ int aout_DecPlay(audio_output_t *aout, block_t *block)
assert (block->i_pts != VLC_TICK_INVALID);
- block->i_length = CLOCK_FREQ * block->i_nb_samples
- / owner->input_format.i_rate;
+ block->i_length = vlc_tick_from_samples( block->i_nb_samples,
+ owner->input_format.i_rate );
int ret = aout_CheckReady (aout);
if (unlikely(ret == AOUT_DEC_FAILED))
diff --git a/src/stream_output/sap.c b/src/stream_output/sap.c
index fa93cce3df..575c6e9c66 100644
--- a/src/stream_output/sap.c
+++ b/src/stream_output/sap.c
@@ -153,7 +153,7 @@ noreturn static void *RunThread (void *self)
for (p_session = addr->first; p_session; p_session = p_session->next)
{
send (addr->fd, p_session->data, p_session->length, 0);
- deadline += addr->interval * CLOCK_FREQ / addr->session_count;
+ deadline += vlc_tick_from_samples(addr->interval, addr->session_count);
if (vlc_cond_timedwait (&addr->wait, &addr->lock, deadline) == 0)
break; /* list may have changed! */
More information about the vlc-commits
mailing list