[FFmpeg-devel] [PATCH 1/3] avcodec/alsdec: Limit maximum channels to 64

Michael Niedermayer michael at niedermayer.cc
Tue Aug 20 00:22:12 EEST 2019


On Mon, Aug 19, 2019 at 05:09:37PM +0200, Thilo Borgmann wrote:
> Am 19.08.19 um 14:27 schrieb Michael Niedermayer:
> > On Mon, Aug 19, 2019 at 07:41:43AM +0200, Thilo Borgmann wrote:
> >> Am 19.08.19 um 01:30 schrieb Michael Niedermayer:
> >>> There seems to be no limit in the specification and upto 64k could be stored
> >>> 64 is chooses as limit as thats also used for AAC and is what a int64 mask
> >>> can handle
> >>>
> >>> An alternative to this patch would be a max_channels variable
> >>
> >> There's a conformance file containing 512 channels, that should be the default max value.
> > 
> > will apply with that value later
> 
> Decoding of that is already stopped via FF_SANE_NB_CHANNELS in lavc/internal.h.
> That is currently set to 256U. I guess pushing that to 512U might already be enough without any change to single decoders?

the problem of out of memory is that the als decoder allocates some pretty
large things per channel. A check on channels needs to happen before
this.
The existing checks didnt achieve that.

I can of course post a patchset that uses FF_SANE_NB_CHANNELS in als and
bump it to the next number if people prefer this ?

Note though that increasing FF_SANE_NB_CHANNELS may also increase timeouts
in other decoders.


> 
> Once fixed, I will add a FATE test for the 512 channel conformance file.

thx

> 
> -Thilo
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190819/1ab73e2a/attachment.sig>


More information about the ffmpeg-devel mailing list