mirror of https://github.com/mpv-player/mpv
player: simplify display-adrop mode safeguard
It's not needed, because the additional data is not appended, but is the total size of the audio buffer. The maximum size is the static audio drop size (or twice, if the audio is duplicated).
This commit is contained in:
parent
fc3f1e7c54
commit
d1ad0815fe
|
@ -562,14 +562,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
|
||||||
|
|
||||||
skip_duplicate = mpctx->last_av_difference >= 0 ? -samples : samples;
|
skip_duplicate = mpctx->last_av_difference >= 0 ? -samples : samples;
|
||||||
|
|
||||||
// safeguard against excessively growing audio buffer sizes
|
playsize = MPMAX(playsize, samples);
|
||||||
if (skip_duplicate < 0 && mp_audio_buffer_seconds(mpctx->ao_buffer) > 5) {
|
|
||||||
skip_duplicate = 0;
|
|
||||||
samples = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (playsize < samples)
|
|
||||||
playsize = samples;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int status = AD_OK;
|
int status = AD_OK;
|
||||||
|
|
Loading…
Reference in New Issue