interlace: fix caps refcounting

tcaps was unrefed when it shouldn't have been unrefed
in some cases.

https://bugzilla.gnome.org/show_bug.cgi?id=734531
This commit is contained in:
Sebastian Rasmussen 2014-08-09 13:12:14 +02:00 committed by Tim-Philipp Müller
parent 128cbf4f57
commit 7731f3b36e

View file

@ -523,6 +523,7 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
if (othercaps) {
icaps = gst_caps_intersect (othercaps, tcaps);
gst_caps_unref (othercaps);
gst_caps_unref (tcaps);
} else {
icaps = tcaps;
}
@ -542,8 +543,6 @@ gst_interlace_getcaps (GstPad * pad, GstInterlace * interlace, GstCaps * filter)
gst_caps_set_simple (icaps, "interlace-mode", G_TYPE_STRING,
pad == interlace->srcpad ? mode : "progressive", NULL);
gst_caps_unref (tcaps);
if (clean_filter)
gst_caps_unref (clean_filter);