You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avutil/hwcontext_dxva2: return an error when buffer allocation fails
This also prevents the use of an uninitialized variable. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -307,8 +307,10 @@ static int dxva2_map_frame(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *
|
|||||||
}
|
}
|
||||||
|
|
||||||
map = av_mallocz(sizeof(*map));
|
map = av_mallocz(sizeof(*map));
|
||||||
if (!map)
|
if (!map) {
|
||||||
|
err = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
err = ff_hwframe_map_create(src->hw_frames_ctx, dst, src,
|
err = ff_hwframe_map_create(src->hw_frames_ctx, dst, src,
|
||||||
dxva2_unmap_frame, map);
|
dxva2_unmap_frame, map);
|
||||||
|
Reference in New Issue
Block a user