diff options
author | Thomas Scheuermann <Thomas.Scheuermann@barco.com> | 2016-09-09 15:36:12 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-09-13 14:19:47 +0200 |
commit | 1215849e69114516c93144ca590db2d751eebce7 (patch) | |
tree | c7938527d21366eca7e2278082d190ad24530c94 /ext | |
parent | dba90631bc853ef710f15ffb03c8c2d94afbcaaf (diff) |
jack: Fix pipeline hang when jack changes sample rate or buffer size
If jackd changes the buffer size or sample rate, jackaudiosink hangs
and can't be stopped. This also happens if jack is configured as slave
and a gstreamer pipeline is started on the slave machine while the jack
master isn't running yet. If the the jack master is started it changes
the buffer size / sample rate and jackaudiosink can't be stopped.
This fix calls jack_shutdown_cb when jack_sample_rate_cb or
jack_buffer_size_cb is called.
https://bugzilla.gnome.org/show_bug.cgi?id=771272
Diffstat (limited to 'ext')
-rw-r--r-- | ext/jack/gstjackaudioclient.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/ext/jack/gstjackaudioclient.c b/ext/jack/gstjackaudioclient.c index 9c50a6a16..44f8e61b4 100644 --- a/ext/jack/gstjackaudioclient.c +++ b/ext/jack/gstjackaudioclient.c @@ -201,20 +201,6 @@ jack_process_cb (jack_nframes_t nframes, void *arg) return res; } -/* we error out */ -static int -jack_sample_rate_cb (jack_nframes_t nframes, void *arg) -{ - return 0; -} - -/* we error out */ -static int -jack_buffer_size_cb (jack_nframes_t nframes, void *arg) -{ - return 0; -} - static void jack_shutdown_cb (void *arg) { @@ -244,6 +230,22 @@ jack_shutdown_cb (void *arg) g_mutex_unlock (&conn->lock); } +/* we error out */ +static int +jack_sample_rate_cb (jack_nframes_t nframes, void *arg) +{ + jack_shutdown_cb(arg); + return 0; +} + +/* we error out */ +static int +jack_buffer_size_cb (jack_nframes_t nframes, void *arg) +{ + jack_shutdown_cb(arg); + return 0; +} + typedef struct { const gchar *id; |