Commit 1f00a4b7 authored by Mathieu Duponchelle's avatar Mathieu Duponchelle 🐸 Committed by Sebastian Dröge

qtmux: Fix leak

gst_qt_mux_can_renegotiate () gets called everywhere following
that pattern:

return gst_qt_mux_can_renegotiate (ref(self));

This means the reference must be released both in the success
and failure cases, it was only done in the success case.
parent 59010ac5
......@@ -4857,6 +4857,7 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
gst_caps_unref (current_caps);
gst_object_unref (qtmux);
return TRUE;
}
......@@ -5233,6 +5234,7 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
gst_caps_unref (current_caps);
gst_object_unref (qtmux);
return TRUE;
}
......@@ -5775,6 +5777,7 @@ gst_qt_mux_subtitle_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, current_caps);
gst_caps_unref (current_caps);
gst_object_unref (qtmux);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment