diff mbox series

[FFmpeg-devel,4/5] avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is not set

Message ID 20210221164659.19180-4-cus@passwd.hu
State New
Headers show
Series [FFmpeg-devel,1/5] avdevice/alsa_dec: do not set codecpar frame_size
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Marton Balint Feb. 21, 2021, 4:46 p.m. UTC
Otherwise fragment_size is ignored.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavdevice/pulse_audio_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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) {