mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
aiffparse: don't leak adapter
This commit is contained in:
parent
ddcfe3ddf3
commit
63d629aba5
1 changed files with 7 additions and 3 deletions
|
@ -1645,13 +1645,17 @@ gst_aiff_parse_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstAiffParse *aiff = GST_AIFF_PARSE (parent);
|
GstAiffParse *aiff = GST_AIFF_PARSE (parent);
|
||||||
|
|
||||||
if (aiff->adapter)
|
if (aiff->adapter) {
|
||||||
g_object_unref (aiff->adapter);
|
g_object_unref (aiff->adapter);
|
||||||
|
aiff->adapter = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case GST_PAD_MODE_PUSH:
|
case GST_PAD_MODE_PUSH:
|
||||||
aiff->streaming = TRUE;
|
if (active) {
|
||||||
aiff->adapter = gst_adapter_new ();
|
aiff->streaming = TRUE;
|
||||||
|
aiff->adapter = gst_adapter_new ();
|
||||||
|
}
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_PAD_MODE_PULL:
|
case GST_PAD_MODE_PULL:
|
||||||
|
|
Loading…
Reference in a new issue