mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
vaapipostproc: use scoped variable for return value
Instead of reusing a parameter variable for the return value of gst_vaapipostproc_transform_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:
parent
d3732a7cf8
commit
bedaa13d7c
1 changed files with 11 additions and 7 deletions
|
@ -1132,17 +1132,21 @@ gst_vaapipostproc_transform_caps (GstBaseTransform * trans,
|
|||
(direction == GST_PAD_SINK) ? "sink" : "src");
|
||||
|
||||
g_mutex_lock (&postproc->postproc_lock);
|
||||
caps = gst_vaapipostproc_transform_caps_impl (trans, direction);
|
||||
out_caps = gst_vaapipostproc_transform_caps_impl (trans, direction);
|
||||
g_mutex_unlock (&postproc->postproc_lock);
|
||||
if (caps && filter) {
|
||||
out_caps = gst_caps_intersect_full (caps, filter, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (caps);
|
||||
caps = out_caps;
|
||||
|
||||
if (out_caps && filter) {
|
||||
GstCaps *intersection;
|
||||
|
||||
intersection = gst_caps_intersect_full (out_caps, filter,
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (out_caps);
|
||||
out_caps = intersection;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (trans, "returning caps: %" GST_PTR_FORMAT, caps);
|
||||
GST_DEBUG_OBJECT (trans, "returning caps: %" GST_PTR_FORMAT, out_caps);
|
||||
|
||||
return caps;
|
||||
return out_caps;
|
||||
}
|
||||
|
||||
static GstCaps *
|
||||
|
|
Loading…
Reference in a new issue