summaryrefslogtreecommitdiff
path: root/libavdevice/pulse_audio_dec.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2021-02-11 23:03:26 +0100
committerMarton Balint <cus@passwd.hu>2021-03-12 23:55:30 +0100
commit7f059a250bb7bcbf7bba537c1a059a5934413035 (patch)
tree5708d59a9d6b43de8301d0dfb6482d1a1be3987d /libavdevice/pulse_audio_dec.c
parent104aa921c96f126c49259c946e995679cec3abd6 (diff)
avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is not set
Otherwise fragment_size is ignored. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/pulse_audio_dec.c')
-rw-r--r--libavdevice/pulse_audio_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c
index 6dea332beb..0454a643dd 100644
--- a/libavdevice/pulse_audio_dec.c
+++ b/libavdevice/pulse_audio_dec.c
@@ -218,7 +218,7 @@ static av_cold int pulse_read_header(AVFormatContext *s)
ret = pa_stream_connect_record(pd->stream, device, &attr,
PA_STREAM_INTERPOLATE_TIMING
- |PA_STREAM_ADJUST_LATENCY
+ | (pd->fragment_size == -1 ? PA_STREAM_ADJUST_LATENCY : 0)
|PA_STREAM_AUTO_TIMING_UPDATE);
if (ret < 0) {