[FFmpeg-devel] [RFC] amerge design issue
Stefano Sabatini
stefasab at gmail.com
Fri Sep 7 12:05:46 CEST 2012
On date Saturday 2012-09-01 11:31:07 +0200, Nicolas George encoded:
> Le sextidi 16 fructidor, an CCXX, Carl Eugen Hoyos a écrit :
> > I'd really like to understand the error message:
> > Why is a channel layout needed?
>
> It needs the input layouts it to determine the layout of the output and the
> routes. The other solution for that kind of filter is to have it as
> argument.
>
> The format negotiation system can not currently handle it in all cases, but
> it can be improved.
>
> I need to look into the case at hand closer to see why the format is not yet
> configured.
Channel layout is configured at the configuration stage,
query_formats() is performed *before* that. Currently amerge seems to
work *only* with movie, since for this filter the channel layout is
computed in the init(), which is a very strong limitation.
The solution seems to declare the output channel layout as a
configuration parameter, rather than guess it when it is not yet
possible to do it.
If you want to keep the current logic, you could check on
query_formats() that channel layout is not defined *and* is defined in
the input links, but that's an unsafe assumption since the
config_props() callbacks on the input may change it.
--
FFmpeg = Fast Formidable Moronic Peaceless Ecumenical Ghost
More information about the ffmpeg-devel
mailing list