va: h265dec: Do not assign the frame->output_buffer until output_picture.
authorHe Junyan <junyan.he@intel.com>
Thu, 22 Jul 2021 14:00:38 +0000 (22:00 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 23 Jul 2021 07:17:06 +0000 (07:17 +0000)
commit99636cd101be97f1fffd62abafc142d2b2b068b2
tree0857140616f8d6b149cc33236a9d84e083b9e0a1
parenta79a756b79aa1675e4ae14eced8b08cdd578d50a
va: h265dec: Do not assign the frame->output_buffer until output_picture.

We may need to drop the slices such as RASL pictures with the NoRaslOutputFlag, so
the current picture of h265decoder may be freed. We should not assign the frame->
output_buffer too early until we really output it. Or, the later coming slices will
allocate another picture and trigger the assert of:
  gst_video_decoder_allocate_output_frame_with_params:
  assertion 'frame->output_buffer == NULL' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2421>
sys/va/gstvah265dec.c