From: Nirbheek Chauhan Date: Sat, 31 Mar 2018 04:58:51 +0000 (+0530) Subject: sendrecv: Don't set pipeline state if it's NULL X-Git-Tag: 1.19.3~487^2~52^2~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=563826deaf63a156f41bfb0e7dc3fd4a0476d02a;p=platform%2Fupstream%2Fgstreamer.git sendrecv: Don't set pipeline state if it's NULL Avoids ugly CRITICAL warnings when erroring out. --- diff --git a/webrtc/sendrecv/gst/webrtc-sendrecv.c b/webrtc/sendrecv/gst/webrtc-sendrecv.c index 607732e..6ccefaa 100644 --- a/webrtc/sendrecv/gst/webrtc-sendrecv.c +++ b/webrtc/sendrecv/gst/webrtc-sendrecv.c @@ -647,11 +647,13 @@ main (int argc, char *argv[]) connect_to_websocket_server_async (); g_main_loop_run (loop); + g_main_loop_unref (loop); - gst_element_set_state (GST_ELEMENT (pipe1), GST_STATE_NULL); - g_print ("Pipeline stopped\n"); - - gst_object_unref (pipe1); + if (pipe1) { + gst_element_set_state (GST_ELEMENT (pipe1), GST_STATE_NULL); + g_print ("Pipeline stopped\n"); + gst_object_unref (pipe1); + } return 0; }