flacdec: Fix used AVCodecContext
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Jun 2013 20:11:07 +0000 (22:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Jun 2013 20:31:54 +0000 (22:31 +0200)
Fixes out of array writes with multiple threads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/flacdec.c

index 2d3e4b3..a0c950b 100644 (file)
@@ -498,6 +498,7 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
     int ret;
 
     *got_frame_ptr = 0;
+    s->avctx = avctx;
 
     if (s->max_framesize == 0) {
         s->max_framesize =