mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
mp_image_tool: guard hw downloading against allocation failures
Small oversight, matters for OOM errors.
This commit is contained in:
@@ -301,7 +301,7 @@ struct mp_image *mp_image_hw_download(struct mp_image *src,
|
||||
av_frame_unref(srcav);
|
||||
dst = mp_image_from_av_frame(dstav);
|
||||
av_frame_unref(dstav);
|
||||
if (res >= 0) {
|
||||
if (res >= 0 && dst) {
|
||||
mp_image_set_size(dst, src->w, src->h);
|
||||
mp_image_copy_attributes(dst, src);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user