]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/imgconvert.c
vp3-mt: fix deadlock when first frame is not a keyframe.
[ffmpeg] / libavcodec / imgconvert.c
index e40de6ebec5d318b09e7b949f65b09924f7a17ed..b37c343b93430acd6815f75c22ace4247903a6db 100644 (file)
@@ -36,8 +36,7 @@
 #include "imgconvert.h"
 #include "libavutil/colorspace.h"
 #include "libavutil/pixdesc.h"
-#include "libavcore/imgutils.h"
-#include "libavcore/internal.h"
+#include "libavutil/imgutils.h"
 
 #if HAVE_MMX && HAVE_YASM
 #include "x86/dsputil_mmx.h"
@@ -813,9 +812,11 @@ void ff_shrink88(uint8_t *dst, int dst_wrap,
 int avpicture_alloc(AVPicture *picture,
                     enum PixelFormat pix_fmt, int width, int height)
 {
-    if (av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 0) < 0) {
-    memset(picture, 0, sizeof(AVPicture));
-    return -1;
+    int ret;
+
+    if ((ret = av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 1)) < 0) {
+        memset(picture, 0, sizeof(AVPicture));
+        return ret;
     }
 
     return 0;