[FFmpeg-devel] [PATCH 2/6] lavu/channel_layout: implement unknown layouts.
Michael Niedermayer
michaelni at gmx.at
Thu Nov 29 21:41:53 CET 2012
On Thu, Nov 29, 2012 at 07:07:17PM +0100, Nicolas George wrote:
> Le nonidi 9 frimaire, an CCXXI, Michael Niedermayer a écrit :
[...]
> > movie fails in this case due to a unsupported channel layout, it has
> > to currently for sure and i dont see why this should change if we
> > allow layout=0 on filter graph input
>
> You are wrong. The application I showed works for usual files, because movie
> and the rest of the filters can work with stereo. Then the user updates
> libavfilter.so.3 into a newer version: with your fix, it becomes capable of
> reading TrueHD files, and gets layout=0. Depending on how the rest of the
> application is implemented, it could result in a buffer overflow.
What i meant was:
Axiom 1. the movie source does not set |layout| != number channels
Axiom 2. source filters that take input from the application accept
and pass on the layout if it is 0
Axiom 3. All other filters not mentioned in previous axioms never
output layout 0 unless one of its inputs is layout 0
The intent here is layout either
A. "matches" the channel count or
B. is explicitly set to 0 by the application
there is by design no way to ever get a layout = 0 without the
application having set it to that.
A. is what the API requires
B. implicates that the application supports layout 0 because the
application itself inputs data that is outside the API
This would solve passing unknown or odd layouts through libavfilter
and even do some simple filtering with it like samplerate or volume
changing.
and above all, this looks quite simple to do
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121129/530e3950/attachment.asc>
More information about the ffmpeg-devel
mailing list