Commit 408f0870 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

decklinkaudio{src,sink}: Only start streams / scheduled playback if there is a...

decklinkaudio{src,sink}: Only start streams / scheduled playback if there is a videosrc at this point
parent 349113d1
......@@ -454,7 +454,7 @@ gst_decklink_audio_sink_ringbuffer_release (GstAudioRingBuffer * rb)
g_mutex_lock (&self->output->lock);
self->output->audio_enabled = FALSE;
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);
......@@ -641,7 +641,7 @@ gst_decklink_audio_sink_change_state (GstElement * element,
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
g_mutex_lock (&buf->output->lock);
buf->output->audio_enabled = TRUE;
if (buf->output->start_scheduled_playback)
if (buf->output->start_scheduled_playback && buf->output->videosink)
buf->output->start_scheduled_playback (buf->output->videosink);
g_mutex_unlock (&buf->output->lock);
break;
......
......@@ -378,7 +378,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
g_mutex_lock (&self->input->lock);
self->input->audio_enabled = TRUE;
if (self->input->start_streams)
if (self->input->start_streams && self->input->videosrc)
self->input->start_streams (self->input->videosrc);
g_mutex_unlock (&self->input->lock);
......@@ -672,7 +672,7 @@ gst_decklink_audio_src_close (GstDecklinkAudioSrc * self)
g_mutex_lock (&self->input->lock);
self->input->got_audio_packet = NULL;
self->input->audio_enabled = FALSE;
if (self->input->start_streams)
if (self->input->start_streams && self->input->videosrc)
self->input->start_streams (self->input->videosrc);
g_mutex_unlock (&self->input->lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment