[FFmpeg-devel] [PATCH] Add a time_base field to AVFilterPad.

Stefano Sabatini stefano.sabatini-lala
Thu Oct 7 15:03:38 CEST 2010


On date Thursday 2010-10-07 03:08:40 +0200, Michael Niedermayer encoded:
> On Wed, Oct 06, 2010 at 11:32:42PM +0200, Stefano Sabatini wrote:
> > On date Wednesday 2010-10-06 22:48:16 +0200, Michael Niedermayer encoded:
> > > On Wed, Oct 06, 2010 at 10:07:54PM +0200, Stefano Sabatini wrote:
[...]
> > > > BTW we need to set the timebase in the two ends of a link (either in
> > > > the link itself or in the input and output pads) if we want to keep
> > > > the timestamp conversion code in the framework rather than in the
> > > > filters code.
> > > 
> > > when does this design simplify filters?
> > > do you have an example?
> > > it seems simpler to have just one tb per link
> > 
> > A filter in general may to set the output timebase, and another filter
> > the input timebase.
> > 
> > Think for example of a source, which generates video frames with given
> > framerate, or a movie sink which needs to use the same timebase as set
> > in the muxer, so I believe this in general is a useful feature that we
> > want to keep.
> 
> the movie sink can contain that 1 line of code to rescale
> any other filters that would need that?
> 
> if not then this really seems the more logic approuch

The problem with the timebase in the link approach is that it may
require each filter to automatically check in start_frame()
if the input/output link timebases changes accordingly (so we'd have
to add code to many already existing filters).

On the other hand I'm seeing now that the previous code was flawed, as
the pts was set in the picref passed rather than in a new reference,
so it was invalidating the pts of the picref used in the previous
filters.

Check the new patch.
-- 
FFmpeg = Funny Fierce Magical Peaceless Efficient Gorilla



More information about the ffmpeg-devel mailing list