]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/videotoolbox.c
avcodec/videotoolbox: fix opaque_ref handling
[ffmpeg] / libavcodec / videotoolbox.c
index 4547ffef34d803b17d49a2ffad25a9a1a7691727..9eeada30bae8021716e7437f4a438a14f3280df7 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/avutil.h"
 #include "libavutil/hwcontext.h"
 #include "bytestream.h"
+#include "decode.h"
 #include "h264dec.h"
 #include "hevcdec.h"
 #include "mpegvideo.h"
@@ -70,6 +71,10 @@ static int videotoolbox_buffer_copy(VTContext *vtctx,
 
 int ff_videotoolbox_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
 {
+    int ret = ff_attach_decode_data(frame);
+    if (ret < 0)
+        return ret;
+
     frame->width  = avctx->width;
     frame->height = avctx->height;
     frame->format = avctx->pix_fmt;