mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
gstplayer: Plug a memory leak
This was showing up as a memory leak in GTK's gstreamer media backend: 40 bytes in 1 blocks are definitely lost in loss record 18,487 of 40,868 at 0x484586F: malloc (vg_replace_malloc.c:381) by 0x50D5278: g_malloc (gmem.c:125) by 0x50EDBA5: g_slice_alloc (gslice.c:1072) by 0x50EFBCC: g_slice_alloc0 (gslice.c:1098) by 0x51F2F45: g_type_create_instance (gtype.c:1911) by 0x51DAE37: g_object_new_internal (gobject.c:2011) by 0x51DC080: g_object_new_with_properties (gobject.c:2181) by 0x51DCB20: g_object_new (gobject.c:1821) by 0x9855F86: UnknownInlinedFun (gstplayer-wrapped-video-renderer.c:109) by 0x9855F86: gst_player_new (gstplayer.c:579) Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1374 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2875>
This commit is contained in:
parent
025e446470
commit
491dcddf6e
1 changed files with 2 additions and 1 deletions
|
@ -565,7 +565,6 @@ gst_player_new (GstPlayerVideoRenderer * video_renderer,
|
|||
{
|
||||
static GOnce once = G_ONCE_INIT;
|
||||
GstPlayer *self;
|
||||
GstPlayerVideoRenderer *renderer = NULL;
|
||||
|
||||
g_once (&once, gst_player_init_once, NULL);
|
||||
|
||||
|
@ -576,9 +575,11 @@ gst_player_new (GstPlayerVideoRenderer * video_renderer,
|
|||
self->play = gst_play_new (NULL);
|
||||
|
||||
if (video_renderer != NULL) {
|
||||
GstPlayerVideoRenderer *renderer;
|
||||
renderer = gst_player_wrapped_video_renderer_new (video_renderer, self);
|
||||
g_object_set (self->play, "video-renderer",
|
||||
GST_PLAY_VIDEO_RENDERER (renderer), NULL);
|
||||
g_object_unref (renderer);
|
||||
}
|
||||
|
||||
if (signal_dispatcher != NULL) {
|
||||
|
|
Loading…
Reference in a new issue