]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flacdec.c
flacdec: don't call allocate_buffers() in init_thread_copy() when s->max_blocksize...
[ffmpeg] / libavcodec / flacdec.c
index a7303d6d1244929ed95da04ace24503593c4af12..22f6651acfee12a4608c84dbcb89113385959c7a 100644 (file)
@@ -574,7 +574,9 @@ static int init_thread_copy(AVCodecContext *avctx)
     FLACContext *s = avctx->priv_data;
     s->decoded_buffer = NULL;
     s->decoded_buffer_size = 0;
-    return allocate_buffers(s);
+    if (s->max_blocksize)
+        return allocate_buffers(s);
+    return 0;
 }
 
 static av_cold int flac_decode_close(AVCodecContext *avctx)