Browse Source

af_asyncts: check return value from lavr when flushing.

Fixes an infinite loop on flush when avresample_get_delay() still
reports some samples but avresample_convert() doesn't return any data.
tags/n1.0
Anton Khirnov 13 years ago
parent
commit
91a84a5247
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      libavfilter/af_asyncts.c

+ 7
- 2
libavfilter/af_asyncts.c View File

@@ -133,8 +133,13 @@ static int request_frame(AVFilterLink *link)
nb_samples);
if (!buf)
return AVERROR(ENOMEM);
avresample_convert(s->avr, (void**)buf->extended_data, buf->linesize[0],
nb_samples, NULL, 0, 0);
ret = avresample_convert(s->avr, (void**)buf->extended_data,
buf->linesize[0], nb_samples, NULL, 0, 0);
if (ret <= 0) {
avfilter_unref_bufferp(&buf);
return (ret < 0) ? ret : AVERROR_EOF;
}

buf->pts = s->pts;
return ff_filter_samples(link, buf);
}


Loading…
Cancel
Save