player: Ensure the GstPlay is created before the wrapped renderer

The GstPlayerWrappedVideoRenderer implicitely depends on GstPlay.

Fixes #878

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1345>
This commit is contained in:
Philippe Normand 2021-11-13 12:22:36 +00:00
parent 12a5bf64f8
commit ee7fe545b2

View file

@ -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;