v4l2object: Don't leak empty caps

https://bugzilla.gnome.org/show_bug.cgi?id=720568
This commit is contained in:
Nicolas Dufresne 2014-01-10 12:39:16 -05:00
parent a54b34121f
commit 5be7d39a3f

View file

@ -2139,8 +2139,10 @@ gst_v4l2_object_probe_caps_for_format (GstV4l2Object * v4l2object,
GList *results = NULL;
guint32 w, h;
if (pixelformat == GST_MAKE_FOURCC ('M', 'P', 'E', 'G'))
return gst_caps_new_empty_simple ("video/mpegts");
if (pixelformat == GST_MAKE_FOURCC ('M', 'P', 'E', 'G')) {
gst_caps_append_structure (ret, gst_structure_copy (template));
return ret;
}
memset (&size, 0, sizeof (struct v4l2_frmsizeenum));
size.index = 0;