[PATCH 4/4] winegstreamer: Fix refcounting for videoflip

Andrew Eikum aeikum at codeweavers.com
Mon Jul 18 08:22:11 CDT 2016


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Sun, Jul 17, 2016 at 02:58:22PM +1000, Jan Schmidt wrote:
> 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>
> ---
>  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);
> -- 
> 2.7.4
> 
> 
> 



More information about the wine-patches mailing list