[FFmpeg-devel] [PATCH] lavfi: add duration field to AVFilterBufferRef
nicolas.george at normalesup.org
Tue Jul 31 15:05:42 CEST 2012
Le quartidi 14 thermidor, an CCXX, Stefano Sabatini a écrit :
> Uh, why? Expressions which only relies on the pts won't be affected by
> the duration.
Yes, but duration is affected by frame selection: if the expression keeps,
for example, one frame out of three, the duration must be multiplied by
The same problem goes for setpts; it could evaluate the expression at
PTS+duration, but that only works if the expression does not have side
> The current problem is that we lack the duration information, in case
> of an ending stream we only have the last frame PTS, and the only way
> to compute the duration of the last frame is by guessing.
That is absolutely true, but there would be other solutions to solve that.
For example a dummy last frame.
> Also we
> can't always assume *continuous* streams, we could have gaps inside a
> video stream and with the current information we have no way to detect
> If case of duration / next timestamp inconsistency, they should be
> addressed by each single filter. I expect that most filters will only
> rely on the pts information, and we can fix the duration/pts
> information with the setpts filter (and asetpts, which we still miss).
That may work, but I am not entirely sure it will not make the burden
> Same semantic as the pkt_duration field in AVFrame, a duration of 0
> means unspecified, a negative value should be regarded as invalid
> (unless we have some use for a negative duration??). I'll update the
> patch accordingly.
Clément had expressed concerns with that convention: there may be situations
where duration=0 makes senses. I do not remember the specifics,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel