summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas@ndufresne.ca>2017-09-20 01:46:15 +0000
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-10-07 17:33:41 -0400
commitcebb5baaa60220730c77d61e215adcd3d8a2c14c (patch)
tree78149acf1335ab8a838d2158fab6cfe7dca4e287
parent9ad90f3bf2caae9c1f485be04b6e11109ce0ce1a (diff)
v4l2videoenc/dec: Don't leak template caps
-rw-r--r--sys/v4l2/gstv4l2videodec.c2
-rw-r--r--sys/v4l2/gstv4l2videoenc.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c
index 0183b257b..c23572642 100644
--- a/sys/v4l2/gstv4l2videodec.c
+++ b/sys/v4l2/gstv4l2videodec.c
@@ -983,6 +983,8 @@ gst_v4l2_video_dec_subclass_init (gpointer g_class, gpointer data)
"Codec/Decoder/Video", cdata->description,
"Nicolas Dufresne <nicolas.dufresne@collabora.com>");
+ gst_caps_unref (cdata->sink_caps);
+ gst_caps_unref (cdata->src_caps);
g_free (cdata);
}
diff --git a/sys/v4l2/gstv4l2videoenc.c b/sys/v4l2/gstv4l2videoenc.c
index 72db259e1..4a14f31f6 100644
--- a/sys/v4l2/gstv4l2videoenc.c
+++ b/sys/v4l2/gstv4l2videoenc.c
@@ -1116,6 +1116,8 @@ gst_v4l2_video_enc_subclass_init (gpointer g_class, gpointer data)
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
cdata->src_caps));
+ gst_caps_unref (cdata->sink_caps);
+ gst_caps_unref (cdata->src_caps);
g_free (cdata);
}