[vlc-commits] opensles: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 18:59:54 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:41:19 2017 +0100| [16d5697502a2b333462de24b9fceb32f9896eb50] | committer: Thomas Guillem

opensles: use vlc_alloc helper

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

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

diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index b8221b6b17..0419d4560f 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -461,7 +461,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
     /* XXX: rounding shouldn't affect us at normal sampling rate */
     sys->rate = fmt->i_rate;
     sys->samples_per_buf = OPENSLES_BUFLEN * fmt->i_rate / 1000;
-    sys->buf = malloc(OPENSLES_BUFFERS * sys->samples_per_buf * bytesPerSample());
+    sys->buf = vlc_alloc(sys->samples_per_buf * bytesPerSample(), OPENSLES_BUFFERS);
     if (!sys->buf)
         goto error;
 



More information about the vlc-commits mailing list