]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/pulse_audio_dec.c
avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is not set
[ffmpeg] / 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) {