Commit 73700b78 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

PulseAudio: buffer metrics are buffer metrics not overall metrics

This should fix buffer underflows in most cases.
(cherry picked from commit 01d9caa19dcca42211d9763517b77b28857ca07f)
parent f3d6e5a1
...@@ -383,15 +383,13 @@ static int Open(vlc_object_t *obj) ...@@ -383,15 +383,13 @@ static int Open(vlc_object_t *obj)
const pa_stream_flags_t flags = PA_STREAM_INTERPOLATE_TIMING const pa_stream_flags_t flags = PA_STREAM_INTERPOLATE_TIMING
| PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_AUTO_TIMING_UPDATE
| PA_STREAM_ADJUST_LATENCY
| PA_STREAM_START_CORKED; | PA_STREAM_START_CORKED;
const uint32_t byterate = pa_bytes_per_second(&ss); const uint32_t byterate = pa_bytes_per_second(&ss);
struct pa_buffer_attr attr; struct pa_buffer_attr attr;
/* no point in larger buffers on PA side than VLC */
attr.maxlength = -1; attr.maxlength = -1;
attr.tlength = byterate * AOUT_MAX_ADVANCE_TIME / CLOCK_FREQ; attr.tlength = byterate * AOUT_MAX_PREPARE_TIME / CLOCK_FREQ;
attr.prebuf = byterate * AOUT_MAX_PREPARE_TIME / CLOCK_FREQ; attr.prebuf = -1;
attr.minreq = -1; attr.minreq = -1;
attr.fragsize = 0; /* not used for output */ attr.fragsize = 0; /* not used for output */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment