[FFmpeg-cvslog] r20419 - trunk/libavfilter/vf_null.c

Michael Niedermayer michaelni
Fri Oct 30 20:59:00 CET 2009


On Fri, Oct 30, 2009 at 03:30:50PM +0100, Stefano Sabatini wrote:
> On date Friday 2009-10-30 13:06:09 +0100, Michael Niedermayer wrote:
> > On Fri, Oct 30, 2009 at 12:11:25PM +0100, stefano wrote:
> > > Author: stefano
> > > Date: Fri Oct 30 12:11:25 2009
> > > New Revision: 20419
> > > 
> > > Log:
> > > Remove the get_video_buffer() callback.
> > > 
> > > That was never required since avfilter_get_video_buffer() already
> > > calls itself on the next link if get_video_buffer is not defined.
> > 
> > Please send patches before commiting to avfilter, avfilter is complex,
> > its easy to mess up.
> > also its not true that this was never required, rather your r20272
> > change made it unneeded and iam pretty sure this part of r20272 is
> > going to bite us
> 
> Sorry, I committed as I considered it quite trivial, the "never" was
> assumed with regards to the main SVN null filter, which was added
> after r20272.
> 
> > id rataher revert r20419 and part of r20272 becuase as is a filter with
> > 2 outputs will send buffers allocated by output 0 down a random path,
> > and these may be hardware buffers that are very limited.
> > the buffer should only ever be taken from the output if it is also
> > send back to that output later.
> > limiting the code from r20272 to output_count==1 and documenting the
> > default behavior is probably the least that has to be done. That is
> > this is a critical thing every filter author must check
> > [Do i pass buffers through? if not i MUST overide get_video_buffer
> >  because the default passes allocates through behind my back]
> > before r20272 it was
> > [Do i pass buffers through? if so i SHOULD overide get_video_buffer]
> 
> OK, I see your point, but from your reply it's not clear if you're
> asking:
> 
> 1) to make avfilter_get_video_buffer() implicitely call
> avfilter_get_video_buffer() on the next filter only if output_count == 1:
> 
> if(!ret && link->dst->output_count == 1)
>    ret = avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
> 
> 2) to make avfilter_get_video_buffer() *always* call
> avfilter_default_get_video_buffer() if the get_video_buffer() callback
> is not defined.
> 
> Solution 1) does not require to revert the change to the vf_null
> filter.
> 
> Thinking at that, I tend to prefer the second option, as implements a
> more clear/explicit behavior.

iam also leaning more toward the 2nd

if you implement that though, please check all filters get_video_buffer()
to make sure nothing mismatches

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20091030/9e7238ae/attachment.pgp>



More information about the ffmpeg-cvslog mailing list