mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
tests: fix bus leak in hls_demux testSeek unit test
We add the signal watch in testSeekPreTestCallback so remove it in testSeekPostTestCallback and not deep inside some if clause in some other callback somewhere.
This commit is contained in:
parent
5b68e12d01
commit
2ab238a4d0
1 changed files with 5 additions and 1 deletions
|
@ -433,7 +433,6 @@ testSeekOnStateChanged (GstBus * bus, GstMessage * msg, gpointer user_data)
|
|||
TEST_TASK_STATE_WAITING_FOR_TESTSRC_STATE_CHANGE) {
|
||||
GST_DEBUG ("changing test_task_state");
|
||||
testData->test_task_state = TEST_TASK_STATE_EXITING;
|
||||
gst_bus_remove_signal_watch (bus);
|
||||
g_cond_signal (&testData->test_task_state_cond);
|
||||
}
|
||||
g_mutex_unlock (&testData->test_task_state_lock);
|
||||
|
@ -464,6 +463,7 @@ static void
|
|||
testSeekPostTestCallback (GstAdaptiveDemuxTestEngine * engine,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstBus *bus;
|
||||
GList *walk;
|
||||
|
||||
GstAdaptiveDemuxTestCase *testData = GST_ADAPTIVE_DEMUX_TEST_CASE (user_data);
|
||||
|
@ -472,6 +472,10 @@ testSeekPostTestCallback (GstAdaptiveDemuxTestEngine * engine,
|
|||
|
||||
fail_if (td->segment_verification_needed);
|
||||
}
|
||||
|
||||
bus = gst_pipeline_get_bus (GST_PIPELINE (engine->pipeline));
|
||||
gst_bus_remove_signal_watch (bus);
|
||||
gst_object_unref (bus);
|
||||
}
|
||||
|
||||
/* function to check total size of data received by AppSink
|
||||
|
|
Loading…
Reference in a new issue