webrtc_test: Change src_pipeline state to NULL before calling g_clear_object() 70/261770/3
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 26 Jul 2021 05:55:07 +0000 (14:55 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 28 Jul 2021 02:46:25 +0000 (11:46 +0900)
[Version] 0.2.59
[Issue Type] Bug fix

Change-Id: I43557965d3e64b7ad7c248a909b2f2d9d7c97e06
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
test/webrtc_test.c

index 9fe045cfde363dc1649102fc951f57293c90b0da..411582858ad6e5219170cc4e05e17161b7e12bff 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.2.58
+Version:    0.2.59
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 0cfa3563fce74215f5738be3008438fa175c6b15..344f4eba0bd070ac8a7361fa10c436acd8645406 100644 (file)
@@ -387,8 +387,10 @@ static void __release_packet_source(int conn_idx, unsigned int source_idx)
                gst_object_unref(packet_source->bus);
                packet_source->bus = NULL;
        }
-       g_clear_object(&packet_source->src_pipeline);
-       packet_source->src_pipeline = NULL;
+       if (packet_source->src_pipeline) {
+               gst_element_set_state(packet_source->src_pipeline, GST_STATE_NULL);
+               g_clear_object(&packet_source->src_pipeline);
+       }
 
        g_mutex_clear(&packet_source->mutex);
        g_cond_clear(&packet_source->cond);