mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
playback/player: don't unref gtk_sink but sink it
Commit 5b8ba60c
was added because of a memory leak when gtksink was
used as renderer. Nonetheless the patch didn't consider two facts:
1\ that the gtk_sink element was in floating state
2\ there is another code path where the gtk_sink element is already
sank
Thus the correct fix, is not to ref and unref gtk_sink, but sink it.
https://bugzilla.gnome.org/show_bug.cgi?id=781904
This commit is contained in:
parent
175f7c8da1
commit
ff1a6546da
1 changed files with 1 additions and 3 deletions
|
@ -113,14 +113,12 @@ gst_player_gtk_video_renderer_init (GstPlayerGtkVideoRenderer * self)
|
|||
self->sink = sink;
|
||||
} else {
|
||||
gtk_sink = gst_element_factory_make ("gtksink", NULL);
|
||||
|
||||
self->sink = gst_object_ref (gtk_sink);
|
||||
self->sink = gst_object_ref_sink (gtk_sink);
|
||||
}
|
||||
|
||||
g_assert (self->sink != NULL);
|
||||
|
||||
g_object_get (gtk_sink, "widget", &self->widget, NULL);
|
||||
gst_object_unref (gtk_sink);
|
||||
}
|
||||
|
||||
static GstElement *gst_player_gtk_video_renderer_create_video_sink
|
||||
|
|
Loading…
Reference in a new issue