[Ffmpeg-devel] Some more thoughts about libavfilter

Luca Abeni lucabe72
Tue Jan 9 14:38:30 CET 2007

Hi Michael,

On Tue, 2007-01-09 at 01:51 +0100, Michael Niedermayer wrote:
> > 2) The "last" filter who use the AVFrame buffer is responsible for
> > freeing it.
> what if there are several Fout? (several outputs)
You are right. I forgot to mention that using this mechanism a single
frame buffer cannot be pushed to two different output filters, and a
copy is needed for the second output (well, I had something similar
witten on my old notes, but it was too confused and I skipped it :).

If this additional copy is not acceptable, then I think refcounting is
the only way to go (or am I missing some other possible solution?).
Is it acceptable to add a reference_count field in AVFrame? (or should
the "opaque" field be used?). An alternative would be to use an
"extended avframe" structure defined as
  int reference_count

Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

More information about the ffmpeg-devel mailing list