summaryrefslogtreecommitdiffstats
path: root/ext/pulse
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-06-03 18:19:22 +0300
committerStefan Kost <ensonic@users.sf.net>2009-06-03 18:19:22 +0300
commit2af7977e1d6cc9a00947995cb75cd976d802e09d (patch)
treea9e0683b3525de2d7c40d7a63e2cf9d349069fb5 /ext/pulse
parente7987ed06b257533cc81c51991d7d227c4f14c40 (diff)
pulsesink: use values from pa_stream_get_buffer_attr()
We were putting the requested values back into ringbuffer spec, instead of using the queried values.
Diffstat (limited to 'ext/pulse')
-rw-r--r--ext/pulse/pulsesink.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 9743662f..95c34a22 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -658,13 +658,15 @@ gst_pulseringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
/* get the actual buffering properties now */
buf_attr_ptr = pa_stream_get_buffer_attr (pbuf->stream);
- GST_INFO_OBJECT (psink, "tlength: %d", buf_attr_ptr->tlength);
+ GST_INFO_OBJECT (psink, "tlength: %d (wanted: %d)", buf_attr_ptr->tlength,
+ buf_attr.tlength);
GST_INFO_OBJECT (psink, "maxlength: %d", buf_attr_ptr->maxlength);
GST_INFO_OBJECT (psink, "prebuf: %d", buf_attr_ptr->prebuf);
- GST_INFO_OBJECT (psink, "minreq: %d", buf_attr_ptr->minreq);
+ GST_INFO_OBJECT (psink, "minreq: %d (wanted %d)", buf_attr_ptr->minreq,
+ buf_attr.minreq);
- spec->segsize = buf_attr.minreq;
- spec->segtotal = buf_attr.tlength / spec->segsize;
+ spec->segsize = buf_attr_ptr->minreq;
+ spec->segtotal = buf_attr_ptr->tlength / spec->segsize;
pa_threaded_mainloop_unlock (psink->mainloop);