[FFmpeg-devel] [PATCH 5/5] vulkan_decode: fix small memory leak

Lynne dev at lynne.ee
Tue Jun 13 07:24:08 EEST 2023

This small memory leak was essentially responsible for keeping
decoding working at all.

The issue is that the codec profile must be attached to the frames
context. We created the codec profile at decoder creation time.
Which meant that if the decoder was destroyed, the context
became essentially useless, and segfaulted as the profile
was a hanging pointer.
This was an issue that happened when seeking through H264.

This requires using the new AVHWFramesContext.opaque field, as
otherwise, the profile attached to the decoder will be freed
before the frames context, rendering the frames context useless.

Patch attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-vulkan_decode-fix-small-memory-leak.patch
Type: text/x-diff
Size: 909 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230613/daf0baf8/attachment.patch>

More information about the ffmpeg-devel mailing list