X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fqsvvpp.c;h=8d5ff2eb653c398361efe567394caf0f363041e6;hb=b0a9960a772a5f978fc9f52552932c6a2ab3405c;hp=06efdf50891d006fa5e93345da186388bd125e16;hpb=bad70b7af6b909691f5389e14eb7d0c03db10af9;p=ffmpeg diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 06efdf50891..8d5ff2eb653 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -153,6 +153,7 @@ static int map_frame_to_surface(AVFrame *frame, mfxFrameSurface1 *surface) { switch (frame->format) { case AV_PIX_FMT_NV12: + case AV_PIX_FMT_P010: surface->Data.Y = frame->data[0]; surface->Data.UV = frame->data[1]; break; @@ -316,7 +317,6 @@ static QSVFrame *submit_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *p } av_frame_copy_props(qsv_frame->frame, picref); - av_frame_free(&picref); } else qsv_frame->frame = av_frame_clone(picref); @@ -461,6 +461,8 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s) out_frames_ctx->height = FFALIGN(outlink->h, 32); out_frames_ctx->sw_format = s->out_sw_format; out_frames_ctx->initial_pool_size = 64; + if (avctx->extra_hw_frames > 0) + out_frames_ctx->initial_pool_size += avctx->extra_hw_frames; out_frames_hwctx->frame_type = s->out_mem_mode; ret = av_hwframe_ctx_init(out_frames_ref);