summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2013-07-22 18:00:16 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2013-07-22 18:09:44 +0100
commit82c342f83bfdc8e57ee29e72aad848ba200443fc (patch)
treeb91224072947966b3dcc343f7c753b5ef56b1681 /gst
parent118876702467d6063e9c9745b7d093682ad16472 (diff)
downloadgst-plugins-good-82c342f83bfdc8e57ee29e72aad848ba200443fc.tar.gz
gst-plugins-good-82c342f83bfdc8e57ee29e72aad848ba200443fc.tar.xz
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')
-rw-r--r--gst/deinterlace/gstdeinterlace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 22afe42ae..985b44129 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);