lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS

release/7.1
Tomas Härdin 9 months ago
parent 36126e4c14
commit 5b32685d77
  1. 5
      libavcodec/speedhqdec.c

@ -40,6 +40,7 @@
#include "mpeg12data.h" #include "mpeg12data.h"
#include "mpeg12vlc.h" #include "mpeg12vlc.h"
#include "speedhq.h" #include "speedhq.h"
#include "thread.h"
#define MAX_INDEX (64 - 1) #define MAX_INDEX (64 - 1)
@ -433,7 +434,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame,
avctx->coded_width = FFALIGN(avctx->width, 16); avctx->coded_width = FFALIGN(avctx->width, 16);
avctx->coded_height = FFALIGN(avctx->height, 16); avctx->coded_height = FFALIGN(avctx->height, 16);
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) { if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) {
return ret; return ret;
} }
frame->flags |= AV_FRAME_FLAG_KEY; frame->flags |= AV_FRAME_FLAG_KEY;
@ -649,5 +650,5 @@ const FFCodec ff_speedhq_decoder = {
.priv_data_size = sizeof(SHQContext), .priv_data_size = sizeof(SHQContext),
.init = speedhq_decode_init, .init = speedhq_decode_init,
FF_CODEC_DECODE_CB(speedhq_decode_frame), FF_CODEC_DECODE_CB(speedhq_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1, .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
}; };

Loading…
Cancel
Save