From f9d16c591339c9efe6ee71156ef6815601f80060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 19 Dec 2014 14:38:03 +0100 Subject: [PATCH] decklink: Remove in-same-pipeline detection code for audio/video elements of the same device This causes deadlocks sometimes for some reason. --- sys/decklink/gstdecklinkaudiosink.cpp | 8 +++++++- sys/decklink/gstdecklinkaudiosrc.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/decklink/gstdecklinkaudiosink.cpp b/sys/decklink/gstdecklinkaudiosink.cpp index 325f7098b4..e8efbae015 100644 --- a/sys/decklink/gstdecklinkaudiosink.cpp +++ b/sys/decklink/gstdecklinkaudiosink.cpp @@ -265,6 +265,7 @@ gst_decklink_audio_sink_ringbuffer_delay (GstAudioRingBuffer * rb) return ret; } +#if 0 static gboolean in_same_pipeline (GstElement * a, GstElement * b) { @@ -286,6 +287,7 @@ in_same_pipeline (GstElement * a, GstElement * b) return ret; } +#endif static gboolean gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer * rb) @@ -306,11 +308,15 @@ gst_decklink_audio_sink_ringbuffer_start (GstAudioRingBuffer * rb) GST_ELEMENT_ERROR (self->sink, STREAM, FAILED, (NULL), ("Audio sink needs a video sink for its operation")); ret = FALSE; - } else if (!in_same_pipeline (GST_ELEMENT_CAST (self->sink), videosink)) { + } + // FIXME: This causes deadlocks sometimes +#if 0 + else if (!in_same_pipeline (GST_ELEMENT_CAST (self->sink), videosink)) { GST_ELEMENT_ERROR (self->sink, STREAM, FAILED, (NULL), ("Audio sink and video sink need to be in the same pipeline")); ret = FALSE; } +#endif if (videosink) gst_object_unref (videosink); diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp index faa7a36832..7661892501 100644 --- a/sys/decklink/gstdecklinkaudiosrc.cpp +++ b/sys/decklink/gstdecklinkaudiosrc.cpp @@ -575,6 +575,7 @@ gst_decklink_audio_src_close (GstDecklinkAudioSrc * self) return TRUE; } +#if 0 static gboolean in_same_pipeline (GstElement * a, GstElement * b) { @@ -596,6 +597,7 @@ in_same_pipeline (GstElement * a, GstElement * b) return ret; } +#endif static GstStateChangeReturn gst_decklink_audio_src_change_state (GstElement * element, @@ -626,7 +628,10 @@ gst_decklink_audio_src_change_state (GstElement * element, (NULL), ("Audio src needs a video src for its operation")); ret = GST_STATE_CHANGE_FAILURE; goto out; - } else if (!in_same_pipeline (GST_ELEMENT_CAST (self), videosrc)) { + } + // FIXME: This causes deadlocks sometimes +#if 0 + else if (!in_same_pipeline (GST_ELEMENT_CAST (self), videosrc)) { GST_ELEMENT_ERROR (self, STREAM, FAILED, (NULL), ("Audio src and video src need to be in the same pipeline")); @@ -634,6 +639,7 @@ gst_decklink_audio_src_change_state (GstElement * element, gst_object_unref (videosrc); goto out; } +#endif if (videosrc) gst_object_unref (videosrc);