Commit 802a2701 authored by Thibault Saunier's avatar Thibault Saunier

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
parent d7a0fd82
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment