mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
visual: fix caps leak
Fix leak of caps event and of caps objects when setting caps on sink and src
pads. Sync audiovisualizer class implementation to the one in gst-plugins-bad.
This commit matches c5ef1bee73
in that module.
https://bugzilla.gnome.org/show_bug.cgi?id=742875
This commit is contained in:
parent
684e5e0c87
commit
945afe6cc4
1 changed files with 3 additions and 0 deletions
|
@ -768,12 +768,14 @@ gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps)
|
|||
|
||||
/* find a pool for the negotiated caps now */
|
||||
res = gst_audio_visualizer_do_bufferpool (scope, caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
return res;
|
||||
|
||||
/* ERRORS */
|
||||
wrong_caps:
|
||||
{
|
||||
gst_caps_unref (caps);
|
||||
GST_DEBUG_OBJECT (scope, "error parsing caps");
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1292,6 +1294,7 @@ gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent,
|
|||
|
||||
gst_event_parse_caps (event, &caps);
|
||||
res = gst_audio_visualizer_sink_setcaps (scope, caps);
|
||||
gst_event_unref (event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
|
|
Loading…
Reference in a new issue