diff options
author | Niklas Haas <git@haasn.dev> | 2024-07-09 11:28:41 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2024-07-10 11:38:44 +0200 |
commit | 084e0b364df3dad4bc1aa44887b49d9fa1e4011f (patch) | |
tree | e323a82f79fda1e01fa5a962ef80dd9625b201cc /libswscale | |
parent | f1ed351d3b3c247ec372cdb3dc8b112e570d5dec (diff) | |
download | ffmpeg-084e0b364df3dad4bc1aa44887b49d9fa1e4011f.tar.gz |
avfilter/vf_scale: fix frame lifetimes
scale_frame() inconsistently handled the lifetime of `in`. Fixes a
possible double free and a possible memory leak.
The new code always has `scale_frame` take over ownership of the input
frame. I first tried writing this code in a way where the calling code
retains ownership, but this is nontrivial due to the presence of the
no-op short-circuit condition in which the input frame is directly
returned. (As an alternative, we could use av_frame_clone() instead, but
I wanted to avoid touching the original behavior in this commit)
Diffstat (limited to 'libswscale')
0 files changed, 0 insertions, 0 deletions