From 40f1a34d10a5a221f5adac84149e125f06e1b666 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Thu, 5 Nov 2020 09:01:47 +0100 Subject: [PATCH] player: call ref_sink on pipeline Otherwise `gst_player_get_pipeline()` will return a floating reference which may confuse bindings and lead to crash. Fixes #1450 Part-of: --- gst-libs/gst/player/gstplayer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index b2e318fc35..04148fa1d1 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -2907,6 +2907,8 @@ gst_player_main (gpointer data) g_assert_not_reached (); } + gst_object_ref_sink (self->playbin); + if (self->video_renderer) { GstElement *video_sink = gst_player_video_renderer_create_video_sink (self->video_renderer,