mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
decklinkaudiosink: Don't crash if started without corresponding video sink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8253>
This commit is contained in:
parent
26e769589a
commit
10f870ac5c
1 changed files with 7 additions and 1 deletions
|
@ -556,6 +556,12 @@ gst_decklink_audio_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
self->output->output->BeginAudioPreroll ();
|
||||
}
|
||||
|
||||
if (!self->output->videosink) {
|
||||
GST_ERROR_OBJECT (self,
|
||||
"Can't output audio without video sink on the same device");
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
video_sink =
|
||||
GST_DECKLINK_VIDEO_SINK (gst_object_ref (self->output->videosink));
|
||||
|
||||
|
@ -926,7 +932,7 @@ gst_decklink_audio_sink_change_state (GstElement * element,
|
|||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
g_mutex_lock (&self->output->lock);
|
||||
if (self->output->start_scheduled_playback)
|
||||
if (self->output->start_scheduled_playback && self->output->videosink)
|
||||
self->output->start_scheduled_playback (self->output->videosink);
|
||||
g_mutex_unlock (&self->output->lock);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue