Fix coverity issues 10/155810/1 accepted/tizen/4.0/unified/20171018.060711 submit/tizen_4.0/20171017.071842
authorGilbok Lee <gilbok.lee@samsung.com>
Mon, 16 Oct 2017 07:57:46 +0000 (16:57 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Mon, 16 Oct 2017 07:57:46 +0000 (16:57 +0900)
[Version] 0.1.25
[Profile] Mobile, Wearable, TV
[Issue Type] Fix coverity issues

Change-Id: I8f45adbfd1e966f01aed84b25c109c3c6579681a

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

index cdd1708..d9fbcf1 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-mediademuxer
 Summary:    A Media Demuxer library in Tizen Native API
-Version:    0.1.24
+Version:    0.1.25
 Release:    1
 Group:      Multimedia/API
 License:    Apache-2.0
index ae1adb7..c0f1a3e 100755 (executable)
@@ -708,11 +708,19 @@ static void __gst_on_pad_added(GstElement *element, GstPad *pad, gpointer data)
 
        while (tmp->next)
                tmp = tmp->next;
-       if (!tmp || !tmp->caps_string) {
-               MD_I("trak or trak caps_string is NULL\n");
+
+       if (!tmp) {
+               MD_I("trak is NULL\n");
+               MEDIADEMUXER_FLEAVE();
+               return;
+       }
+
+       if (!tmp->caps_string) {
+               MD_I("trak caps_string is NULL\n");
                MEDIADEMUXER_FLEAVE();
                return;
        }
+
        if (tmp->caps_string[0] == 'v') {
                MD_I("found Video Pad\n");
                (head_track->num_video_track)++;