matroska,videofilter: fix caps leak 67/136367/1 accepted/tizen/4.0/unified/20170816.012648 accepted/tizen/4.0/unified/20170816.015421 accepted/tizen/4.0/unified/20170828.222442 accepted/tizen/unified/20170710.154311 submit/tizen/20170707.065345 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100005 submit/tizen_4.0_unified/20170814.115522
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 29 Jun 2017 08:13:09 +0000 (17:13 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 29 Jun 2017 08:13:09 +0000 (17:13 +0900)
Change-Id: I447b10735eed17e52769b939cc88be9f6a9781c2

gst/matroska/matroska-demux.c
gst/videofilter/gstvideobalance.c

index 2fb4928..d5d1ade 100644 (file)
@@ -4958,8 +4958,11 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
         static GstStaticCaps intra_caps = GST_STATIC_CAPS ("image/jpeg; "
             "video/x-raw; image/png; video/x-dv; video/x-huffyuv; video/x-ffv; "
             "video/x-compressed-yuv");
+        GstCaps *tmp = gst_static_caps_get (&intra_caps);
+
         context->intra_only =
-            gst_caps_can_intersect (gst_static_caps_get (&intra_caps), caps);
+            gst_caps_can_intersect (tmp, caps);
+        gst_caps_unref(tmp);
       }
 
       if (buf)
index 49cad51..2de6f16 100644 (file)
@@ -496,8 +496,10 @@ gst_video_balance_transform_caps (GstBaseTransform * trans,
   if (!gst_video_balance_is_passthrough (balance)) {
     static GstStaticCaps raw_caps =
         GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (PROCESSING_CAPS));
+    GstCaps *tmp = gst_static_caps_get (&raw_caps);
 
-    caps = gst_caps_intersect (caps, gst_static_caps_get (&raw_caps));
+    caps = gst_caps_intersect (caps, tmp);
+    gst_caps_unref (tmp);
 
     if (filter) {
       ret = gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);