fix svace issue 34/105034/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 15 Dec 2016 07:01:33 +0000 (16:01 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 15 Dec 2016 07:01:33 +0000 (16:01 +0900)
Change-Id: I506ba9c5f0f276698cd0290909ef4631adcbadf2

gst-libs/gst/adaptivedemux/gstadaptivedemux.c
gst/mpegtsdemux/tsdemux.c

index f965a5a..2adff9c 100644 (file)
@@ -769,14 +769,12 @@ gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg)
                   }
                 }
 
-                if ((tmp_current_fragment)&&(tmp_newest_fragment)) {
-                  if (g_ascii_strcasecmp(tmp_newest_fragment,tmp_current_fragment) <= 0) {
-                    GST_DEBUG_OBJECT (demux, "newest fragment less than current fragment");
-                    bRet = FALSE;
-                  } else {
-                    GST_DEBUG_OBJECT (demux, "newest fragment more than current fragment");
-                    bRet = TRUE;
-                  }
+                if (g_ascii_strcasecmp(tmp_newest_fragment, tmp_current_fragment) <= 0) {
+                  GST_DEBUG_OBJECT (demux, "newest fragment less than current fragment");
+                  bRet = FALSE;
+                } else {
+                  GST_DEBUG_OBJECT (demux, "newest fragment more than current fragment");
+                  bRet = TRUE;
                 }
 
                 demux->dash_newest_segment = g_strdup(tmp_newest_fragment);
@@ -2100,8 +2098,9 @@ _src_event (GstPad * pad, GstObject * parent, GstEvent * event)
           strncpy(tmp_current_fragment, s1, index2-index1-1);
           tmp_current_fragment[index2-index1-1]='\0';
         }
-        if ((tmp_current_fragment)&&(stream->demux->dash_newest_segment)) {
-          if (g_ascii_strcasecmp(stream->demux->dash_newest_segment,tmp_current_fragment) <= 0) {
+
+        if (stream->demux->dash_newest_segment) {
+          if (g_ascii_strcasecmp(stream->demux->dash_newest_segment, tmp_current_fragment) <= 0) {
             GST_DEBUG_OBJECT (stream->demux, "newest fragment less than current fragment");
             bRet = FALSE;
           } else {
index 498d33f..c1a7745 100644 (file)
@@ -2477,14 +2477,14 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream)
 #ifdef TIZEN_FEATURE_TSDEMUX_MODIFICATION
       /*Modification : fix seek performance issue, when found one non-keyframe,
                  need to combine the left packets to a complete frame and check if it is Keyframe */
-      if(base->seek_offset - demux->last_seek_offset > 100 * base->packetsize)
+      if(base->seek_offset - demux->last_seek_offset > 100 * (guint64)base->packetsize)
       {
         base->seek_offset = demux->last_seek_offset - 100 * base->packetsize;
 
 #else
         base->seek_offset = demux->last_seek_offset - 200 * base->packetsize;
 #endif
-        if (demux->last_seek_offset < 200 * base->packetsize)
+        if (demux->last_seek_offset < 200 * (guint64)base->packetsize)
           base->seek_offset = 0;
         demux->last_seek_offset = base->seek_offset;
         mpegts_packetizer_flush (base->packetizer, FALSE);