mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
image_pool: properly free frames
av_frame_unref() only frees the buffers, not the frame data itself.
This commit is contained in:
parent
b0fb6999a4
commit
c7c92240a9
@ -346,8 +346,8 @@ bool mp_image_hw_upload(struct mp_image *hw_img, struct mp_image *src)
|
||||
ok = av_hwframe_transfer_data(dstav, srcav, 0) >= 0;
|
||||
|
||||
done:
|
||||
av_frame_unref(srcav);
|
||||
av_frame_unref(dstav);
|
||||
av_frame_free(&srcav);
|
||||
av_frame_free(&dstav);
|
||||
|
||||
if (ok)
|
||||
mp_image_copy_attributes(hw_img, src);
|
||||
|
Loading…
Reference in New Issue
Block a user