winegstreamer: Fix refcounting for videoflip.

Creating an element and placing it in a bin gives overship of the
element refcount to the bin. Don't explicitly unref it after that.

Signed-off-by: Jan Schmidt <jan@centricular.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Schmidt 2016-07-17 14:58:22 +10:00 committed by Alexandre Julliard
parent 4aefacd162
commit adde9fadeb

View File

@ -864,7 +864,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, GSTImpl *This)
pin->flip_sink = gst_element_get_static_pad(vconv, "sink");
if(!pin->flip_sink){
WARN("Couldn't find sink on flip filter\n");
gst_object_unref(pin->flipfilter);
pin->flipfilter = NULL;
ret = -1;
goto exit;
@ -875,7 +874,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, GSTImpl *This)
WARN("gst_pad_link failed: %d\n", ret);
gst_object_unref(pin->flip_sink);
pin->flip_sink = NULL;
gst_object_unref(pin->flipfilter);
pin->flipfilter = NULL;
goto exit;
}
@ -885,7 +883,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, GSTImpl *This)
WARN("Couldn't find src on flip filter\n");
gst_object_unref(pin->flip_sink);
pin->flip_sink = NULL;
gst_object_unref(pin->flipfilter);
pin->flipfilter = NULL;
ret = -1;
goto exit;
@ -898,7 +895,6 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, GSTImpl *This)
pin->flip_src = NULL;
gst_object_unref(pin->flip_sink);
pin->flip_sink = NULL;
gst_object_unref(pin->flipfilter);
pin->flipfilter = NULL;
goto exit;
}
@ -1760,7 +1756,8 @@ static ULONG WINAPI GSTOutPin_Release(IPin *iface)
gst_pad_unlink(This->flip_src, This->my_sink);
gst_object_unref(This->flip_src);
gst_object_unref(This->flip_sink);
gst_object_unref(This->flipfilter);
This->flipfilter = NULL;
This->flip_src = This->flip_sink = NULL;
} else
gst_pad_unlink(This->their_src, This->my_sink);
gst_object_unref(This->their_src);