Commit 18516d3e authored by James Almer's avatar James Almer

avutil/hwcontext_dxva2: return an error when buffer allocation fails

This also prevents the use of an uninitialized variable.
Reviewed-by: 's avatarMark Thompson <sw@jkqxz.net>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent f952edaa
......@@ -307,8 +307,10 @@ static int dxva2_map_frame(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *
}
map = av_mallocz(sizeof(*map));
if (!map)
if (!map) {
err = AVERROR(ENOMEM);
goto fail;
}
err = ff_hwframe_map_create(src->hw_frames_ctx, dst, src,
dxva2_unmap_frame, map);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment