[vlc-commits] aout: DecSilence: always use i_bytes_per_frame

Thomas Guillem git at videolan.org
Fri Oct 7 12:10:17 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct  5 15:43:18 2016 +0200| [1e921210db3e9cce37b7bb4da9c89b50b0eb1d03] | committer: Thomas Guillem

aout: DecSilence: always use i_bytes_per_frame

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

 src/audio_output/dec.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 2f75408..16a9f35 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -206,12 +206,9 @@ static void aout_DecSilence (audio_output_t *aout, mtime_t length, mtime_t pts)
     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;
-    block_t *block;
 
-    if (AOUT_FMT_SPDIF(fmt) || AOUT_FMT_HDMI(fmt))
-        block = block_Alloc (4 * frames);
-    else
-        block = block_Alloc (frames * fmt->i_bytes_per_frame);
+    block_t *block = block_Alloc (frames * fmt->i_bytes_per_frame
+                                  / fmt->i_frame_length);
     if (unlikely(block == NULL))
         return; /* uho! */
 



More information about the vlc-commits mailing list