Jan Schmidt : winegstreamer: Fix refcounting for videoflip.
Alexandre Julliard
julliard at winehq.org
Mon Jul 18 09:22:34 CDT 2016
Module: wine
Branch: master
Commit: adde9fadebe07c30ecc9f12685751fb78b3473c5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=adde9fadebe07c30ecc9f12685751fb78b3473c5
Author: Jan Schmidt <jan at centricular.com>
Date: Sun Jul 17 14:58:22 2016 +1000
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 at centricular.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winegstreamer/gstdemux.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 6f98521..f257202 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -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);
More information about the wine-cvs
mailing list