Skip to content

va: Destroy picture unreleased buffers when finalize.

He Junyan requested to merge He_Junyan/gst-plugins-bad:destroy_pic into master

The current way of GstVaDecodePicture's finalize will leak some resource such as parameter buffers and slice data. The current way deliberately leaves these resource releasing logic to va decoder related function and trigger a warning if we free the GstVaDecodePicture without releasing these resources. But in practice, sometimes, you do not have the chance to release these resource before picture is freed. For example, H264/Mpeg2 support multi slice NALs/Packets for one frame. It is possible that we already succeed to parse and generate the first several slices data by _decode_slice(), but then we get a wrong slice NAL/packet and fail to parse it. We decide to discard the whole frame in the decoder's base class, it just free the current picture and does not trigger sub class's function again. In this kind of cases, we do not have the chance to cleanup the resource, and the resource will be leaked.

Merge request reports