v4l2src: fix caps leak

This commit is contained in:
Vincent Penquerc'h 2012-01-13 17:25:59 +00:00
parent 4c2a2063cf
commit b0608128b1

View file

@ -522,11 +522,12 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
}
}
gst_caps_unref (thiscaps);
gst_caps_unref (peercaps);
} else {
/* no peer or peer have ANY caps, work with our own caps then */
caps = thiscaps;
}
if (peercaps)
gst_caps_unref (peercaps);
if (caps) {
caps = gst_caps_make_writable (caps);
gst_caps_truncate (caps);