[FFmpeg-devel] [PATCH 3/5] ffmpeg: flush and drain video filters.

Nicolas George nicolas.george at normalesup.org
Sat Mar 10 21:26:15 CET 2012


Le decadi 20 ventôse, an CCXX, Stefano Sabatini a écrit :
> Can you comment on this? Why is the poll API not enough in this case?

My problem with the poll API is that it is partially redundant code that
_needs_ to be consistent with request_frame, on pain of bugs and strange
behaviours.

This would be a necessary evil if the function did something useful, but it
does not: if you need to know whether there is a frame available, just
request it and see if it comes.

And if in some weird case you need to know whether a frame is available
without using it right away, just add a BufferRef * in the context and store
it for later. Actually, filters need to do that already, since they can get
a frame at any time even when they did not request it (this has caused some
trouble that I am trying to fix in an old branch).

In the current situation, I believe we could just eliminate poll_frame from
all filters without damage, and make avfilter_poll_frame just an alias for
avfilter_request_frame. Less code to maintain, less bugs (see ticket #1040),
for no cost.

Regards,

-- 
  Nicolas George
-------------- 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/20120310/d570341e/attachment.asc>


More information about the ffmpeg-devel mailing list