g_object_set(G_OBJECT(video_filter), "caps", video_caps, NULL);
gst_caps_unref(video_caps);
- gst_element_link_pads(video_filter, "src", rtpbin, "send_rtp_sink_0");
-
+ if (!gst_element_link_pads(video_filter, "src", rtpbin, "send_rtp_sink_0")) {
+ ms_error("Failed to link pads for send_rtp_sink_0");
+ return MEDIA_STREAMER_ERROR_INVALID_OPERATION;
+ }
ghost_pad = (GstGhostPad *)gst_element_get_static_pad(node->gst_element, MS_PAD_VIDEO_IN);
if (ghost_pad) {
if (gst_ghost_pad_set_target(ghost_pad, gst_element_get_static_pad(video_filter, "sink")))