]> git.sesse.net Git - ffmpeg/commitdiff
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 2d3e4b3f70b91b339e99e6f268c1dacdf3a27159..a0c950bdde8bd876130950d4f77961215dbe0b50 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 =