diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2013-07-22 18:00:16 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2013-07-22 18:00:16 +0100 |
commit | f18b1f7e80de90d6465409455d9447008ec9f01a (patch) | |
tree | 04ace317549d7460e0bc96c9cf191c8b0791d19d /gst/deinterlace | |
parent | 0c2ff91a5c9ef9762e71754311bb21938e60f581 (diff) | |
download | gstreamer-plugins-good-f18b1f7e80de90d6465409455d9447008ec9f01a.tar.gz |
deinterlace: fix on-the-fly changing of "mode" and "fields" properties
We call setcaps() to reconfigure ourselves, but we need to pass
the current *sink* caps, not the source caps then. Also fix a
caps leak.
https://bugzilla.gnome.org/show_bug.cgi?id=641599
Diffstat (limited to 'gst/deinterlace')
-rw-r--r-- | gst/deinterlace/gstdeinterlace.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 32109900d..b9b687c86 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -1518,6 +1518,8 @@ restart: field1 = &self->field_history[self->history_count - 1]; if (locking != GST_DEINTERLACE_LOCKING_NONE) { + GstCaps *sinkcaps; + if (!self->state_count) { GST_ERROR_OBJECT (self, "BROKEN! Fields in history + no states should not happen!"); @@ -1564,7 +1566,9 @@ restart: } /* setcaps on sink and src pads */ - gst_deinterlace_setcaps (self, self->sinkpad, gst_pad_get_current_caps (self->sinkpad)); // FIXME + sinkcaps = gst_pad_get_current_caps (self->sinkpad); + gst_deinterlace_setcaps (self, self->sinkpad, sinkcaps); // FIXME + gst_caps_unref (sinkcaps); if (flush_one && self->drop_orphans) { GST_DEBUG_OBJECT (self, "Dropping orphan first field"); @@ -2040,7 +2044,7 @@ gst_deinterlace_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) self->reconfigure = FALSE; GST_OBJECT_UNLOCK (self); - caps = gst_pad_get_current_caps (self->srcpad); + caps = gst_pad_get_current_caps (self->sinkpad); if (caps != NULL) { gst_deinterlace_setcaps (self, self->sinkpad, caps); // FIXME gst_caps_unref (caps); |