[FFmpeg-devel] [PATCH 1/6] lavfi/af_asetnsamples: fix EOF handling.
Stefano Sabatini
stefasab at gmail.com
Sun Mar 31 22:07:37 CEST 2013
On date Sunday 2013-03-31 19:43:44 +0200, Nicolas George encoded:
> Only filter one buffered frame.
> Correctly return EOF if there is none.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/af_asetnsamples.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c
> index 08e5279..e004453 100644
> --- a/libavfilter/af_asetnsamples.c
> +++ b/libavfilter/af_asetnsamples.c
> @@ -171,9 +171,8 @@ static int request_frame(AVFilterLink *outlink)
> } while (!asns->req_fullfilled && ret >= 0);
>
> if (ret == AVERROR_EOF) {
> - do {
> - ret = push_samples(outlink);
> - } while (ret > 0);
> + ret = push_samples(outlink);
> + return ret < 0 ? ret : ret > 0 ? 0 : AVERROR_EOF;
> }
Looks correct, thanks.
--
FFmpeg = Fanciful and Fundamentalist Miracolous Peaceful Erroneous Guru
More information about the ffmpeg-devel
mailing list