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 8353d252d2..398c319b30 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -188,6 +188,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; |