playbin: fix caps memory leak
authorEunhae Choi <eunhae1.choi@samsung.com>
Wed, 7 Dec 2016 03:49:25 +0000 (12:49 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Wed, 7 Dec 2016 03:49:25 +0000 (12:49 +0900)
Change-Id: I51b9086653f950960e43b34245b6c79567b28e51

gst/playback/gstplaybin2.c

index 4a056a0..5cd4c60 100644 (file)
@@ -4615,7 +4615,7 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad,
       ave_list = g_list_prepend (ave_list, NULL);
     }
 
-    /* if it is a decoder and we don't have a fixed sink, then find out 
+    /* if it is a decoder and we don't have a fixed sink, then find out
      * the matching audio/video sink from GstAVElements list */
     for (l = ave_list; l; l = l->next) {
       gboolean created_sink = FALSE;
@@ -4692,6 +4692,7 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad,
           }
 
           gst_object_unref (sinkpad);
+          gst_caps_unref (raw_caps);
           gst_caps_unref (caps);
         }
 
@@ -4803,7 +4804,7 @@ autoplug_select_cb (GstElement * decodebin, GstPad * pad,
   }
 
   /* remember the sink in the group now, the element is floating, we take
-   * ownership now 
+   * ownership now
    *
    * store the sink in the group, we will configure it later when we
    * reconfigure the sink */