v4l2videoenc/dec: Don't leak template caps

This commit is contained in:
Nicolas Dufresne 2017-09-20 01:46:15 +00:00 committed by Nicolas Dufresne
parent 9ad90f3bf2
commit cebb5baaa6
2 changed files with 4 additions and 0 deletions

View file

@ -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);
}

View file

@ -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);
}