return 0;
}
+/* get amount of data currently buffered, in samples */
+static int64_t get_delay(ASyncContext *s)
+{
+ return avresample_available(s->avr) + avresample_get_delay(s->avr);
+}
+
static int request_frame(AVFilterLink *link)
{
AVFilterContext *ctx = link->src;
ret = ff_request_frame(ctx->inputs[0]);
/* flush the fifo */
- if (ret == AVERROR_EOF && (nb_samples = avresample_get_delay(s->avr))) {
+ if (ret == AVERROR_EOF && (nb_samples = get_delay(s))) {
AVFilterBufferRef *buf = ff_get_audio_buffer(link, AV_PERM_WRITE,
nb_samples);
if (!buf)
return ret;
}
-/* get amount of data currently buffered, in samples */
-static int64_t get_delay(ASyncContext *s)
-{
- return avresample_available(s->avr) + avresample_get_delay(s->avr);
-}
-
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
{
AVFilterContext *ctx = inlink->dst;