aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-03-30 22:06:03 +0100
committerMark Thompson <sw@jkqxz.net>2017-03-30 22:06:03 +0100
commitc0f2a8eac172ce720a513abe1706a026236c0579 (patch)
tree9e88b168279cf1bd024460610ecd219a6f25a1d9 /libavcodec/qsvdec.c
parent2f18e452f88fc6ed7b0e308d4de5c386ee1b3a12 (diff)
parent00aeedd84105a17f414185bd33ecadebeddb3a27 (diff)
downloadffmpeg-c0f2a8eac172ce720a513abe1706a026236c0579.tar.gz
Merge commit '00aeedd84105a17f414185bd33ecadebeddb3a27'
* commit '00aeedd84105a17f414185bd33ecadebeddb3a27': qsv{dec,enc}: use a struct as a memory id with internal memory allocator Merged-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c8
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;