diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-05-11 16:12:54 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-05-28 10:15:50 +0300 |
commit | a0898363d9dd1bb524da2d9715afd83d2f267887 (patch) | |
tree | 336693b13b73ac5a7ea16368ab096929e68e4baa /ext/jack/gstjackaudiosink.c | |
parent | addb24743672a6d123d3f7223864910e9968bf6a (diff) | |
download | gst-plugins-bad-a0898363d9dd1bb524da2d9715afd83d2f267887.tar.gz gst-plugins-bad-a0898363d9dd1bb524da2d9715afd83d2f267887.tar.bz2 gst-plugins-bad-a0898363d9dd1bb524da2d9715afd83d2f267887.zip |
jack: when stopping playback, do one more cycle to flush the port. Fixes #582167
The gst_jack_audio_client_set_active() flags the port as deactivating and uses
a GCond to wait until the jack_process_cb() has run once more and cleared the
flag. This way the client zero's the buffer. This happens if one manyally go
to PAUSED and then to READY, while leting the mainloop run inbetween.
Diffstat (limited to 'ext/jack/gstjackaudiosink.c')
-rw-r--r-- | ext/jack/gstjackaudiosink.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c index 01383cbb..58a699d0 100644 --- a/ext/jack/gstjackaudiosink.c +++ b/ext/jack/gstjackaudiosink.c @@ -213,8 +213,8 @@ jack_process_cb (jack_nframes_t nframes, void *arg) if (nframes * sizeof (sample_t) != flen) goto wrong_size; - GST_DEBUG ("copy %d frames: %p, %d bytes, %d channels", nframes, readptr, - flen, channels); + GST_DEBUG_OBJECT (sink, "copy %d frames: %p, %d bytes, %d channels", + nframes, readptr, flen, channels); data = (sample_t *) readptr; /* the samples in the ringbuffer have the channels interleaved, we need to @@ -231,6 +231,7 @@ jack_process_cb (jack_nframes_t nframes, void *arg) /* we wrote one segment */ gst_ring_buffer_advance (buf, 1); } else { + GST_DEBUG_OBJECT (sink, "write %d frames silence", nframes); /* We are not allowed to read from the ringbuffer, write silence to all * jack output buffers */ for (i = 0; i < channels; i++) { @@ -607,7 +608,7 @@ gst_jack_ring_buffer_delay (GstRingBuffer * buf) res = latency; } - GST_DEBUG_OBJECT (sink, "delay %u", res); + GST_LOG_OBJECT (sink, "delay %u", res); return res; } |