mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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
This commit is contained in:
parent
d7a0fd82c0
commit
802a270126
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue