diff --git a/audio/filter/af_scaletempo2_internals.c b/audio/filter/af_scaletempo2_internals.c index 534f4f672a..6e5b31aeda 100644 --- a/audio/filter/af_scaletempo2_internals.c +++ b/audio/filter/af_scaletempo2_internals.c @@ -765,7 +765,8 @@ double mp_scaletempo2_get_latency(struct mp_scaletempo2 *p, double playback_rate bool mp_scaletempo2_frames_available(struct mp_scaletempo2 *p, double playback_rate) { - return p->input_buffer_final_frames > p->target_block_index + return (p->input_buffer_final_frames > p->target_block_index && + p->input_buffer_final_frames > 0) || can_perform_wsola(p, playback_rate) || p->num_complete_frames > 0; }