[FFmpeg-devel] [PATCH 1/7] vp9: use proper refcounting.
Ronald S. Bultje
rsbultje at gmail.com
Tue Nov 26 13:00:21 CET 2013
On Tue, Nov 26, 2013 at 4:01 AM, Clément Bœsch <u at pkh.me> wrote:
> On Mon, Nov 25, 2013 at 09:44:44PM -0500, Ronald S. Bultje wrote:
> > Based on something similar in libav. Author is likely Anton Khirnov
> > <anton at khirnov.net> but I'm not sure.
> > ---
> > libavcodec/vp9.c | 92
> > 1 file changed, 38 insertions(+), 54 deletions(-)
> > diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> > index 785b187..28844b9 100644
> > --- a/libavcodec/vp9.c
> > +++ b/libavcodec/vp9.c
> > - // find unused reference
> > - for (i = 0; i < 10; i++)
> > - if (!s->fb[i]->data)
> > - break;
> > - av_assert0(i < 10);
> > - s->f = s->fb[i];
> > + s->f = frame;
> So, you didn't answer me in the previous submission: In the original
> patch, s->f was unreferenced just after this. Can you explain why it was
> done as such, and/or what was wrong with it?
They have different base expectations. One says that the frame might have
been filled and not properly unreferenced previously by the application.
I'm OK with fixing it, but it will cause issues down the line so I don't
particularly care much. I don't think other codecs care about that use case
- the application is responsible for emptying the frame before inputting it
in the decoder.
More information about the ffmpeg-devel