summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-09-25 14:08:09 +0200
committerThibault Saunier <tsaunier@gnome.org>2015-09-25 14:20:13 +0200
commit802a270126be8b92cb7120072483c3b7cb989fe4 (patch)
treefde6067f7ad0e861bfebfb15f932eccbe5b6cbf0
parentd7a0fd82c0330404553ee7e4885ade0af68c03ad (diff)
downloadgstreamer-plugins-good-802a270126be8b92cb7120072483c3b7cb989fe4.tar.gz
smptealpha: Do not set width/height before comparing with old values
Otherwise we end up considering the values did not change and we wrongly work with the old video format (which will lead to wrong behaviour/segfaults). https://bugzilla.gnome.org/show_bug.cgi?id=755621
-rw-r--r--gst/smpte/gstsmptealpha.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gst/smpte/gstsmptealpha.c b/gst/smpte/gstsmptealpha.c
index 38e1d6c68..06c56aece 100644
--- a/gst/smpte/gstsmptealpha.c
+++ b/gst/smpte/gstsmptealpha.c
@@ -615,22 +615,20 @@ gst_smpte_alpha_set_info (GstVideoFilter * vfilter, GstCaps * incaps,
{
GstSMPTEAlpha *smpte = GST_SMPTE_ALPHA (vfilter);
gboolean ret;
- gint width, height;
smpte->process = NULL;
-
smpte->in_format = GST_VIDEO_INFO_FORMAT (in_info);
smpte->out_format = GST_VIDEO_INFO_FORMAT (out_info);
- smpte->width = width = GST_VIDEO_INFO_WIDTH (out_info);
- smpte->height = height = GST_VIDEO_INFO_HEIGHT (out_info);
/* try to update the mask now, this will also adjust the width/height on
* success */
GST_OBJECT_LOCK (smpte);
ret =
gst_smpte_alpha_update_mask (smpte, smpte->type, smpte->invert,
- smpte->depth, width, height);
+ smpte->depth, GST_VIDEO_INFO_WIDTH (out_info),
+ GST_VIDEO_INFO_HEIGHT (out_info));
GST_OBJECT_UNLOCK (smpte);
+
if (!ret)
goto mask_failed;