vaapipostproc: use scoped variable for return value

Instead of reusing a parameter variable for the return value of
gst_vaapipostproc_fixate_caps(), this patch uses the function scoped
pointer. Thus, the code is cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=785706
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-09-27 13:32:34 +02:00
parent 8fee85ecaa
commit f6fc1774b9

View file

@ -1158,24 +1158,22 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans,
if (direction == GST_PAD_SRC) {
/* @TODO: we can do better */
othercaps = gst_caps_fixate (othercaps);
outcaps = gst_caps_fixate (othercaps);
goto done;
}
g_mutex_lock (&postproc->postproc_lock);
if ((outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps, othercaps)))
gst_caps_replace (&othercaps, outcaps);
outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps, othercaps);
g_mutex_unlock (&postproc->postproc_lock);
/* set passthrough according to caps changes or filter changes */
gst_vaapipostproc_set_passthrough (trans);
done:
GST_DEBUG_OBJECT (trans, "fixated othercaps to %" GST_PTR_FORMAT, othercaps);
if (outcaps)
gst_caps_unref (outcaps);
GST_DEBUG_OBJECT (trans, "fixated othercaps to %" GST_PTR_FORMAT, outcaps);
gst_caps_unref (othercaps);
return othercaps;
return outcaps;
}
static gboolean