[vlc-commits] codec: adpcm: check min samples prior read
Francois Cartegnie
git at videolan.org
Thu Sep 29 11:53:35 CEST 2016
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Sep 29 11:35:32 2016 +0200| [8f5dbde4055ed0196f413dae58d64c0047817815] | committer: Jean-Baptiste Kempf
codec: adpcm: check min samples prior read
(cherry picked from commit 4c17d06b91323a175c676e9878b3a263bf66055b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=8f5dbde4055ed0196f413dae58d64c0047817815
---
modules/codec/adpcm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c
index 7838fc7..3b6872e 100644
--- a/modules/codec/adpcm.c
+++ b/modules/codec/adpcm.c
@@ -448,6 +448,8 @@ static void DecodeAdpcmMs( decoder_t *p_dec, int16_t *p_sample,
int i_block_predictor;
size_t i_total_samples = p_sys->i_samplesperblock;
+ if(i_total_samples < 2)
+ return;
b_stereo = p_dec->fmt_in.audio.i_channels == 2 ? 1 : 0;
More information about the vlc-commits
mailing list