nvencoder: Fix GstNvEncTask leak on non-flow-ok return
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9078>
This commit is contained in:
parent
1fb633368e
commit
8ff0a1c132
@ -2212,6 +2212,8 @@ gst_nv_encoder_handle_frame (GstVideoEncoder * encoder,
|
|||||||
GST_INFO_OBJECT (self, "Last flow was %s",
|
GST_INFO_OBJECT (self, "Last flow was %s",
|
||||||
gst_flow_get_name (priv->last_flow));
|
gst_flow_get_name (priv->last_flow));
|
||||||
gst_video_encoder_release_frame (encoder, frame);
|
gst_video_encoder_release_frame (encoder, frame);
|
||||||
|
if (task)
|
||||||
|
gst_nv_enc_task_unref (task);
|
||||||
|
|
||||||
return priv->last_flow;
|
return priv->last_flow;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user