]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is not set
authorMarton Balint <cus@passwd.hu>
Thu, 11 Feb 2021 22:03:26 +0000 (23:03 +0100)
committerMarton Balint <cus@passwd.hu>
Fri, 12 Mar 2021 22:55:30 +0000 (23:55 +0100)
Otherwise fragment_size is ignored.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavdevice/pulse_audio_dec.c

index 6dea332bebe92795f646fc298203399ee81e020f..0454a643dda8bd2b7170db5b0288392f87b95337 100644 (file)
@@ -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) {