codecs: h265decoder: Fix picture leaks because of reference set.
authorHe Junyan <junyan.he@intel.com>
Fri, 23 Oct 2020 14:29:57 +0000 (22:29 +0800)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 23 Oct 2020 16:21:15 +0000 (16:21 +0000)
commit002cddf131e9450a48f89bb961f710a694631036
treef57bf9e15c824a620d1916602fbefc6bce585680
parent4d296a07e4004d0215e7733ffb81a7f976bc5e33
codecs: h265decoder: Fix picture leaks because of reference set.

The last frame's reference set has no one to cleanup. We need to
clean all pictures in the stop() func.
We also add a helper function to cleanup all the pictures in the
reference picture set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1717>
gst-libs/gst/codecs/gsth265decoder.c