mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Revert "Pulsesink: Allow chunks up to bufsize instead of segsize"
This reverts commit 1e2c1467ae
.
The commit causes pulsesink to ignore the latency-time baseaudiosink property.
This commit is contained in:
parent
9b15f9c6a1
commit
11bcac7c90
1 changed files with 8 additions and 8 deletions
|
@ -1351,11 +1351,11 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
|
|||
|
||||
towrite = out_samples * bps;
|
||||
|
||||
/* Only ever write bufsize bytes at once. This will
|
||||
* also limit the PA shm buffer to bufsize
|
||||
/* Only ever write segsize bytes at once. This will
|
||||
* also limit the PA shm buffer to segsize
|
||||
*/
|
||||
if (towrite > bufsize)
|
||||
towrite = bufsize;
|
||||
if (towrite > buf->spec.segsize)
|
||||
towrite = buf->spec.segsize;
|
||||
|
||||
if ((pbuf->m_writable < towrite) || (offset != pbuf->m_lastoffset)) {
|
||||
/* if no room left or discontinuity in offset,
|
||||
|
@ -1404,9 +1404,9 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
|
|||
}
|
||||
|
||||
/* make sure we only buffer up latency-time samples */
|
||||
if (pbuf->m_writable > bufsize) {
|
||||
if (pbuf->m_writable > buf->spec.segsize) {
|
||||
/* limit buffering to latency-time value */
|
||||
pbuf->m_writable = bufsize;
|
||||
pbuf->m_writable = buf->spec.segsize;
|
||||
|
||||
GST_LOG_OBJECT (psink, "Limiting buffering to %" G_GSIZE_FORMAT,
|
||||
pbuf->m_writable);
|
||||
|
@ -1425,9 +1425,9 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
|
|||
pbuf->m_writable);
|
||||
|
||||
/* Just to make sure that we didn't get more than requested */
|
||||
if (pbuf->m_writable > bufsize) {
|
||||
if (pbuf->m_writable > buf->spec.segsize) {
|
||||
/* limit buffering to latency-time value */
|
||||
pbuf->m_writable = bufsize;
|
||||
pbuf->m_writable = buf->spec.segsize;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue