mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
va: baseenc: Do not use codec frame structure again after finish_frame().
In _push_out_one_buffer(), we use codec frame structure again for error handling after we already call finish_frame(), which is a latent segment fault. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739>
This commit is contained in:
parent
27c33f0161
commit
8e2bbfed13
1 changed files with 4 additions and 1 deletions
|
@ -494,15 +494,18 @@ _push_out_one_buffer (GstVaBaseEnc * base)
|
|||
{
|
||||
GstVideoCodecFrame *frame_out;
|
||||
GstFlowReturn ret;
|
||||
guint32 system_frame_number;
|
||||
|
||||
frame_out = g_queue_pop_head (&base->output_list);
|
||||
gst_video_codec_frame_unref (frame_out);
|
||||
|
||||
system_frame_number = frame_out->system_frame_number;
|
||||
|
||||
ret = _push_buffer_to_downstream (base, frame_out);
|
||||
|
||||
if (ret != GST_FLOW_OK)
|
||||
GST_ERROR_OBJECT (base, "fails to push one buffer, "
|
||||
"system_frame_number %d", frame_out->system_frame_number);
|
||||
"system_frame_number %d", system_frame_number);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue