[FFmpeg-devel] [PATCH 6/6] lavfi/af_atempo: simplify request_frame loop.
Michael Niedermayer
michaelni at gmx.at
Mon Apr 1 18:15:33 CEST 2013
On Sun, Mar 31, 2013 at 12:36:36PM -0600, Pavel Koshevoy wrote:
> On 3/31/13 11:43 AM, Nicolas George wrote:
> >Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> >---
> > libavfilter/af_atempo.c | 11 +++--------
> > 1 file changed, 3 insertions(+), 8 deletions(-)
> >
> >diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c
> >index 9547969..af49b0b 100644
> >--- a/libavfilter/af_atempo.c
> >+++ b/libavfilter/af_atempo.c
> >@@ -139,7 +139,6 @@ typedef struct {
> > FFTSample *correlation;
> > // for managing AVFilterPad.request_frame and AVFilterPad.filter_frame
> >- int request_fulfilled;
> > AVFrame *dst_buffer;
> > uint8_t *dst;
> > uint8_t *dst_end;
> >@@ -181,7 +180,6 @@ static void yae_clear(ATempoContext *atempo)
> > atempo->dst = NULL;
> > atempo->dst_end = NULL;
> >- atempo->request_fulfilled = 0;
> > atempo->nsamples_in = 0;
> > atempo->nsamples_out = 0;
> > }
> >@@ -1017,6 +1015,8 @@ static int config_props(AVFilterLink *inlink)
> > int sample_rate = (int)inlink->sample_rate;
> > int channels = av_get_channel_layout_nb_channels(inlink->channel_layout);
> >+ ctx->outputs[0]->flags |= FF_LINK_FLAG_REQUEST_LOOP;
> >+
> > return yae_reset(atempo, format, sample_rate, channels);
> > }
> >@@ -1074,7 +1074,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *src_buffer)
> > ret = push_samples(atempo, outlink, n_out);
> > if (ret < 0)
> > goto end;
> >- atempo->request_fulfilled = 1;
> > }
> > }
> >@@ -1090,11 +1089,7 @@ static int request_frame(AVFilterLink *outlink)
> > ATempoContext *atempo = ctx->priv;
> > int ret;
> >- atempo->request_fulfilled = 0;
> >- do {
> >- ret = ff_request_frame(ctx->inputs[0]);
> >- }
> >- while (!atempo->request_fulfilled && ret >= 0);
> >+ ret = ff_request_frame(ctx->inputs[0]);
> > if (ret == AVERROR_EOF) {
> > // flush the filter:
>
> Looks OK. Perhaps I shouldn't be listed as the maintainer for
> af_atempo.c any more, since you and others are making all of the
> changes? I don't really have anything new to add to the filter
> anyway...
you reviewed that patch here, thats pretty much what a maintainer
should do so i dont see a problem ...
A problem would be if you dont want to maintain it anymore or if you
dont have time to do it anymore AND theres someone else who does have
more interrest and time, in that case the maintainer should be changed.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130401/e339cb4f/attachment.asc>
More information about the ffmpeg-devel
mailing list