deinterleave: fix leaks

- Flush the bus so messages aren't leaked
- Fix pad leak

https://bugzilla.gnome.org/show_bug.cgi?id=766561
This commit is contained in:
Guillaume Desmottes 2016-05-13 15:12:22 +02:00 committed by Sebastian Dröge
parent 5f2b32e642
commit c7621e24ec

View file

@ -191,8 +191,10 @@ GST_START_TEST (test_2_channels)
mysinkpads = NULL; mysinkpads = NULL;
g_object_unref (deinterleave); g_object_unref (deinterleave);
gst_bus_set_flushing (bus, TRUE);
g_object_unref (bus); g_object_unref (bus);
gst_caps_unref (caps); gst_caps_unref (caps);
gst_object_unref (mysrcpad);
} }
GST_END_TEST; GST_END_TEST;
@ -262,8 +264,10 @@ GST_START_TEST (test_2_channels_1_linked)
mysinkpads = NULL; mysinkpads = NULL;
g_object_unref (deinterleave); g_object_unref (deinterleave);
gst_bus_set_flushing (bus, TRUE);
g_object_unref (bus); g_object_unref (bus);
gst_caps_unref (caps); gst_caps_unref (caps);
gst_object_unref (mysrcpad);
} }
GST_END_TEST; GST_END_TEST;
@ -399,9 +403,11 @@ GST_START_TEST (test_2_channels_caps_change)
mysinkpads = NULL; mysinkpads = NULL;
g_object_unref (deinterleave); g_object_unref (deinterleave);
gst_bus_set_flushing (bus, TRUE);
g_object_unref (bus); g_object_unref (bus);
gst_caps_unref (caps); gst_caps_unref (caps);
gst_caps_unref (caps2); gst_caps_unref (caps2);
gst_object_unref (mysrcpad);
} }
GST_END_TEST; GST_END_TEST;