[FFmpeg-cvslog] r20419 - trunk/libavfilter/vf_null.c
Fri Oct 30 15:30:50 CET 2009
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
> 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
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, 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
Thinking at that, I tend to prefer the second option, as implements a
more clear/explicit behavior.
More information about the ffmpeg-cvslog