[FFmpeg-devel] [PATCH 2/4] vf_pad: reinit on input parameter changes.
stefasab at gmail.com
Tue Jul 17 22:44:20 CEST 2012
On date Tuesday 2012-07-17 16:30:00 +0200, Michael Niedermayer encoded:
> On Tue, Jul 17, 2012 at 09:18:59AM +0200, Stefano Sabatini wrote:
> > Also I'm not sure this can work. Link properties are assumed to be
> > invariant, if you change them you need to reconfigure the whole
> > filtergraph as the attached filters may need to do some
> > reinintialization, the problem should be tackled at the framework
> > level rather than in each single filter.
> thats not possible in some cases. And also not how vf_scale works
> reconfiguring the whole filtergraph destroys the state of all filters
Random idea: we could implement a flag which tells init not to destroy
the state of a filter if possible. And we could mark filters which
doesn't admit input/output properties changes with a flag, so that
libavfilter with auto-insert conversion filters when required. And of
course this change will require a serious rethinking of the framework,
so I'm not saying that this can be done easily.
> in the use case for this patchset the output of vf_scale changes in
> size and vf_pad again makes it constant so filters downstream of pad
> dont need to be reinited.
Yes but what if there is no pad filter attached to scale? for example
if you have pad,setdar=34/21. setdar computes the target aspect ratio
in init() based on the input link properties, if they change "on the
fly" the output DAR will change as well.
Or am I missing something?
FFmpeg = Frightening Fundamental Multimedia Philosophical Extroverse God
More information about the ffmpeg-devel