mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
play: Make ownership of video-sink clearer in combination with floating references
And correctly handle the case of VideoRenderer::create_video_sink() not actually returning a floating reference, which might be tricky for some bindings. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
This commit is contained in:
parent
f060b8b6f3
commit
aff79db608
1 changed files with 7 additions and 2 deletions
|
@ -598,11 +598,16 @@ gst_play_set_playbin_video_sink (GstPlay * self)
|
|||
{
|
||||
GstElement *video_sink = NULL;
|
||||
|
||||
if (self->video_renderer != NULL)
|
||||
if (self->video_renderer != NULL) {
|
||||
video_sink =
|
||||
gst_play_video_renderer_create_video_sink (self->video_renderer, self);
|
||||
if (video_sink)
|
||||
}
|
||||
|
||||
if (video_sink) {
|
||||
gst_object_ref_sink (video_sink);
|
||||
g_object_set (self->playbin, "video-sink", video_sink, NULL);
|
||||
gst_object_unref (video_sink);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue