fix memoryleak and unerflow 75/114575/1 accepted/tizen/common/20170214.173905 accepted/tizen/ivi/20170214.230155 accepted/tizen/mobile/20170214.230044 accepted/tizen/tv/20170214.230106 accepted/tizen/wearable/20170214.230128 submit/tizen/20170214.113450
authorSeokHoon Lee <andy.shlee@samsung.com>
Mon, 13 Feb 2017 06:02:56 +0000 (15:02 +0900)
committerSeokHoon LEE <andy.shlee@samsung.com>
Tue, 14 Feb 2017 05:44:24 +0000 (21:44 -0800)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: Id3d760189f8bb32cf28f326eb07cd045016efcd0

wfdmanager/wfdbase/gstwfdsinkmessage.c
wfdtsdemux/wfdtsdemux.c [changed mode: 0755->0644]

index 550358f..83a3026 100644 (file)
@@ -1398,12 +1398,14 @@ GstWFDResult gst_wfd_message_set_supported_video_format(GstWFDMessage *msg, GstW
 
   if (vCodec != GST_WFD_VIDEO_UNKNOWN) {
     msg->video_formats->list = g_new0(GstWFDVideoCodec, 1);
+
+    temp >>= 1;
     while (temp) {
       nativeindex++;
       temp >>= 1;
     }
 
-    msg->video_formats->list->native = nativeindex - 1;
+    msg->video_formats->list->native = nativeindex;
     msg->video_formats->list->native <<= 3;
 
     if (vNative == GST_WFD_VIDEO_VESA_RESOLUTION)
old mode 100755 (executable)
new mode 100644 (file)
index f9a6a4b..50ff7d3
@@ -1160,6 +1160,10 @@ create_pad_for_stream (WFDTSBase * base, WFDTSBaseStream * bstream,
       /* hack for itv hd (sid 10510, video pid 3401 */
       if (program->program_number == 10510 && bstream->pid == 3401) {
         template = gst_static_pad_template_get (&video_template);
+        if (name)
+          g_free (name);
+        if (caps)
+          gst_caps_unref (caps);
         name = g_strdup_printf ("video_%04x", bstream->pid);
         caps = gst_caps_new_simple ("video/x-h264",
             "stream-format", G_TYPE_STRING, "byte-stream",