From ee7fe545b2d6f8c26b0d53830395726e11ae6eb2 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Sat, 13 Nov 2021 12:22:36 +0000 Subject: [PATCH 2/2] player: Ensure the GstPlay is created before the wrapped renderer The GstPlayerWrappedVideoRenderer implicitely depends on GstPlay. Fixes #878 Part-of: --- subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer.c b/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer.c index cbc9501a36..d11e7a62db 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer.c @@ -573,10 +573,13 @@ gst_player_new (GstPlayerVideoRenderer * video_renderer, g_object_new (GST_TYPE_PLAYER, "signal-dispatcher", signal_dispatcher, NULL); + self->play = gst_play_new (NULL); + if (video_renderer != NULL) { renderer = gst_player_wrapped_video_renderer_new (video_renderer, self); + g_object_set (self->play, "video-renderer", + GST_PLAY_VIDEO_RENDERER (renderer), NULL); } - self->play = gst_play_new (GST_PLAY_VIDEO_RENDERER (renderer)); if (signal_dispatcher != NULL) { GMainContext *context = NULL; -- 2.33.1