lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS

This commit is contained in:
Tomas Härdin 2024-05-08 14:17:18 +02:00
parent 36126e4c14
commit 5b32685d77
1 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@
#include "mpeg12data.h"
#include "mpeg12vlc.h"
#include "speedhq.h"
#include "thread.h"
#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_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;
}
frame->flags |= AV_FRAME_FLAG_KEY;
@ -649,5 +650,5 @@ const FFCodec ff_speedhq_decoder = {
.priv_data_size = sizeof(SHQContext),
.init = speedhq_decode_init,
FF_CODEC_DECODE_CB(speedhq_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
};