mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
gstreamer: Fix output state reference leak
This commit is contained in:
parent
b498bdb765
commit
d9efa54783
1 changed files with 3 additions and 1 deletions
|
@ -725,6 +725,7 @@ gst_svtav1enc_set_format (GstVideoEncoder * encoder,
|
|||
GstSvtAv1Enc *svtav1enc = GST_SVTAV1ENC (encoder);
|
||||
GstClockTime min_latency_frames = 0;
|
||||
GstCaps *src_caps = NULL;
|
||||
GstVideoCodecState *output_state;
|
||||
GST_DEBUG_OBJECT (svtav1enc, "set_format");
|
||||
|
||||
if (svtav1enc->state)
|
||||
|
@ -750,9 +751,10 @@ gst_svtav1enc_set_format (GstVideoEncoder * encoder,
|
|||
|
||||
src_caps =
|
||||
gst_static_pad_template_get_caps (&gst_svtav1enc_src_pad_template);
|
||||
gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (encoder), src_caps,
|
||||
output_state = gst_video_encoder_set_output_state (GST_VIDEO_ENCODER (encoder), src_caps,
|
||||
svtav1enc->state);
|
||||
gst_caps_unref (src_caps);
|
||||
gst_video_codec_state_unref (output_state);
|
||||
|
||||
GST_DEBUG_OBJECT (svtav1enc, "output caps: %" GST_PTR_FORMAT,
|
||||
svtav1enc->state->caps);
|
||||
|
|
Loading…
Reference in a new issue