diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 206099cec0..5806339eb7 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -446,8 +446,10 @@ static int amovie_request_frame(AVFilterLink *outlink) if (movie->is_done) return AVERROR_EOF; - if ((ret = amovie_get_samples(outlink)) < 0) - return ret; + do { + if ((ret = amovie_get_samples(outlink)) < 0) + return ret; + } while (!movie->samplesref); avfilter_filter_samples(outlink, avfilter_ref_buffer(movie->samplesref, ~0)); avfilter_unref_buffer(movie->samplesref);