]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vble.c
qsvdec: only access hwaccel_context is the pixel format is QSV
[ffmpeg] / libavcodec / vble.c
index 00ac8a3491b4d03b400616f14dcee3d97bc459a5..1a7803673122788cb888e225b0c53bbc68109bfd 100644 (file)
@@ -24,8 +24,9 @@
  * VBLE Decoder
  */
 
-#define BITSTREAM_READER_LE
+#include "libavutil/imgutils.h"
 
+#define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "get_bits.h"
 #include "huffyuvdsp.h"
@@ -183,8 +184,8 @@ static av_cold int vble_decode_init(AVCodecContext *avctx)
     avctx->pix_fmt = AV_PIX_FMT_YUV420P;
     avctx->bits_per_raw_sample = 8;
 
-    ctx->size = avpicture_get_size(avctx->pix_fmt,
-                                   avctx->width, avctx->height);
+    ctx->size = av_image_get_buffer_size(avctx->pix_fmt,
+                                         avctx->width, avctx->height, 1);
 
     ctx->val = av_malloc(ctx->size * sizeof(*ctx->val));
 
@@ -206,5 +207,5 @@ AVCodec ff_vble_decoder = {
     .init           = vble_decode_init,
     .close          = vble_decode_close,
     .decode         = vble_decode_frame,
-    .capabilities   = CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1,
 };