[FFmpeg-cvslog] avcodec/opusdec: check alignment, misalignment could lead to crashes with avx

Michael Niedermayer git at videolan.org
Sun May 25 00:51:34 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 25 00:38:20 2014 +0200| [46e3883519b7592e946258c68d072abd89e583c8] | committer: Michael Niedermayer

avcodec/opusdec: check alignment, misalignment could lead to crashes with avx

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46e3883519b7592e946258c68d072abd89e583c8
---

 libavcodec/opusdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index 12c342c..b28edfb 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -240,6 +240,7 @@ static int opus_decode_frame(OpusStreamContext *s, const uint8_t *data, int size
             av_log(s->avctx, AV_LOG_ERROR, "Error resampling SILK data.\n");
             return samples;
         }
+        av_assert2((samples & 7) == 0);
         s->delayed_samples += s->packet.frame_duration - samples;
     } else
         ff_silk_flush(s->silk);



More information about the ffmpeg-cvslog mailing list