[vlc-commits] core: use samples_from_vlc_tick()

Steve Lhomme git at videolan.org
Thu Sep 20 16:16:06 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 20 13:49:56 2018 +0200| [1f5627c62e0a943b5ab5985e1c37fea0de5cc027] | committer: Steve Lhomme

core: use samples_from_vlc_tick()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f5627c62e0a943b5ab5985e1c37fea0de5cc027
---

 src/audio_output/dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 5c1f834d36..79bf91bc3f 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -209,7 +209,7 @@ static void aout_DecSilence (audio_output_t *aout, vlc_tick_t length, vlc_tick_t
 {
     aout_owner_t *owner = aout_owner (aout);
     const audio_sample_format_t *fmt = &owner->mixer_format;
-    size_t frames = (fmt->i_rate * length) / CLOCK_FREQ;
+    size_t frames = samples_from_vlc_tick(length, fmt->i_rate);
 
     block_t *block = block_Alloc (frames * fmt->i_bytes_per_frame
                                   / fmt->i_frame_length);



More information about the vlc-commits mailing list