[FFmpeg-devel] [PATCH] lavfi: add duration field to AVFilterBufferRef
stefasab at gmail.com
Wed Aug 1 11:34:59 CEST 2012
On date Tuesday 2012-07-31 21:39:53 +0200, Clément Bœsch encoded:
> On Tue, Jul 31, 2012 at 03:05:42PM +0200, Nicolas George wrote:
> > > 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,
> > unfortunately.
> duration=0 might be an "empty stopping subtitle" (see tx3g subtitles for
> example). duration=-1 might make sense for subtitle lasting up the the
> next one (but that shouldn't happen at that level since the decode step
> would have set the correct timestamp).
> Also we might expect duration=0 in various situation (let's say after a
> timestamp rescaling for instance).
Should we keep frame duration semantic in lavfi in synch with
Also what about *audio* frames, does it make sense to define a
duration for them as well. What's the meaning of a samples buffer with
a nominal duration greater than the one covered by the contained
samples (should we pad it with silence, should we repeat it, should we
Or should we keep it a property of only *video buffers*, and always
rely on nb_samples+sample_rate when dealing with audio buffers?
FFmpeg = Foolish and Furious MultiPurpose Elected Gigant
More information about the ffmpeg-devel