aiffparse: don't leak adapter
This commit is contained in:
parent
ddcfe3ddf3
commit
63d629aba5
@ -1645,13 +1645,17 @@ gst_aiff_parse_sink_activate_mode (GstPad * sinkpad, GstObject * parent,
|
||||
gboolean res;
|
||||
GstAiffParse *aiff = GST_AIFF_PARSE (parent);
|
||||
|
||||
if (aiff->adapter)
|
||||
if (aiff->adapter) {
|
||||
g_object_unref (aiff->adapter);
|
||||
aiff->adapter = NULL;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case GST_PAD_MODE_PUSH:
|
||||
aiff->streaming = TRUE;
|
||||
aiff->adapter = gst_adapter_new ();
|
||||
if (active) {
|
||||
aiff->streaming = TRUE;
|
||||
aiff->adapter = gst_adapter_new ();
|
||||
}
|
||||
res = TRUE;
|
||||
break;
|
||||
case GST_PAD_MODE_PULL:
|
||||
|
Loading…
x
Reference in New Issue
Block a user