Fix Coverity Issue 93/271593/1 accepted/tizen/unified/20220223.132506 submit/tizen/20220223.080041
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 23 Feb 2022 07:49:35 +0000 (16:49 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Wed, 23 Feb 2022 07:50:49 +0000 (16:50 +0900)
[Version] 0.1.38
[Issue Type] Fix svace issue

Change-Id: I59c7f5463e8e9f4b9d88e7a521cf16ddc2017123

packaging/capi-mediademuxer.spec
src/port_gst/mediademuxer_port_gst.c

index c5b4be7..b49aa52 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-mediademuxer
 Summary:    A Media Demuxer library in Tizen Native API
-Version:    0.1.37
+Version:    0.1.38
 Release:    1
 Group:      Multimedia/API
 License:    Apache-2.0
index d53637f..d3132d4 100644 (file)
@@ -500,7 +500,10 @@ static int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head,
                                gst_caps_unref(outcaps);
                                temp->need_codec_data = FALSE;
                        } else if (strstr(temp->caps_string, "mpeg")) {
-                               gst_element_link(parse_element, temp->appsink);
+                               if (!gst_element_link(parse_element, temp->appsink)) {
+                                       MD_E("failed to link parse element to appsink");
+                                       goto ERROR;
+                               }
                        } else {
                                MEDIADEMUXER_LINK_PAD(queue_src_pad, apppad, ERROR);
                        }
@@ -597,7 +600,10 @@ static int __gst_add_track_info(GstPad *pad, GstCaps *caps, track **head,
                        MEDIADEMUXER_SYNC_STATE_WITH_PARENT(parse_element, ERROR);
 
                        /* Link src pad with appSink element */
-                       gst_element_link(parse_element, temp->appsink);
+                       if (!gst_element_link(parse_element, temp->appsink)) {
+                               MD_E("failed to link parse element to appsink");
+                               goto ERROR;
+                       }
                } else {
                        MEDIADEMUXER_LINK_PAD(queue_src_pad, apppad, ERROR);
                }
@@ -1943,4 +1949,4 @@ static int __gst_eos_callback(int track_num, void* user_data)
                MD_E("EOS received, but callback is not set!!!");
        return MD_ERROR_NONE;
 }
-//LCOV_EXCL_STOP
\ No newline at end of file
+//LCOV_EXCL_STOP