diff options
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r-- | libavcodec/qsvdec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index e11aa71a2a..113bac16cd 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -203,6 +203,14 @@ static int alloc_frame(AVCodecContext *avctx, QSVContext *q, QSVFrame *frame) frame->surface.Data.UV = frame->frame->data[1]; } + if (q->frames_ctx.mids) { + ret = ff_qsv_find_surface_idx(&q->frames_ctx, frame); + if (ret < 0) + return ret; + + frame->surface.Data.MemId = &q->frames_ctx.mids[ret]; + } + frame->used = 1; return 0; |