[FFmpeg-devel] [PATCH] libavfilter-soc: Make overlay handle still images
Vitor Sessak
vitor1001
Tue May 12 18:43:37 CEST 2009
Vitor Sessak wrote:
> Martin Storsj? wrote:
>> On Fri, 8 May 2009, Vitor Sessak wrote:
>>
>>>> Actually, there's a use for them. Imagine that there's a frame
>>>> available in
>>>> input 0, but none at all in input 1.
>>> Is there any way the if (!over->pics[0][0] || !over->pics[1][0]) can be
>>> triggered other than in the first time request_frame() is called? If no,
>>> "!over->pics[1][0]" and "!over->pics[0][0]" are always true.
>>
>>> Note that if one of the inputs each EOF, it will stay at EOF. Note
>>> also that the poll_frame mechanism guarantees that there is either an
>>> available frame or EOF for each input.
>>
>> I guess that's true in principle, but what if request_frame() still is
>> called (for some unknown reason, haven't checked through the rest of
>> the framework to see if there's something stopping this from
>> happening) after the first call which returned EOF?
>
> Indeed, and indeed there is at least one filter that call
> request_frame() repeatedly even after EOF: overlay. I am not sure if the
> API should forbid calling request_frame() after EOF or not (comments
> welcome). Another possibility would be to make avfilter_request_frame()
> handle that by not calling filter->request_frame() anymore after the
> first time it returns EOF. Anyway, this discussion goes beyond your
> patch and I will apply it in a couple of days if nobody else comments on
> it.
Thanks for the patch, applied.
-Vitor
More information about the ffmpeg-devel
mailing list