summaryrefslogtreecommitdiff
path: root/sys/decklink/gstdecklinkaudiosink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sys/decklink/gstdecklinkaudiosink.cpp')
-rw-r--r--sys/decklink/gstdecklinkaudiosink.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/decklink/gstdecklinkaudiosink.cpp b/sys/decklink/gstdecklinkaudiosink.cpp
index 13234c918..128b7b90c 100644
--- a/sys/decklink/gstdecklinkaudiosink.cpp
+++ b/sys/decklink/gstdecklinkaudiosink.cpp
@@ -845,6 +845,14 @@ gst_decklink_audio_sink_change_state (GstElement * element,
GST_OBJECT_LOCK (self);
gst_audio_stream_align_mark_discont (self->stream_align);
GST_OBJECT_UNLOCK (self);
+
+ g_mutex_lock (&self->output->lock);
+ if (self->output->start_scheduled_playback)
+ self->output->start_scheduled_playback (self->output->videosink);
+ g_mutex_unlock (&self->output->lock);
+ break;
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+ gst_decklink_audio_sink_stop (self);
break;
default:
break;
@@ -855,16 +863,6 @@ gst_decklink_audio_sink_change_state (GstElement * element,
return ret;
switch (transition) {
- case GST_STATE_CHANGE_PAUSED_TO_READY:
- gst_decklink_audio_sink_stop (self);
- break;
- case GST_STATE_CHANGE_PAUSED_TO_PLAYING:{
- g_mutex_lock (&self->output->lock);
- if (self->output->start_scheduled_playback)
- self->output->start_scheduled_playback (self->output->videosink);
- g_mutex_unlock (&self->output->lock);
- break;
- }
default:
break;
}