Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Luca Barbato
On 14/08/15 20:29, Martin Storsjö wrote: Feel free to suggest how to do it; currently the lib blindly writes data into the output buffer without checking the given allocation size; we can only make sure it's big enough for the current lib versions, for newer lib versions it can well go out of

Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Martin Storsjö
On Fri, 14 Aug 2015, Luca Barbato wrote: On 14/08/15 16:06, Martin Storsjö wrote: Nope, and more problematically; if the lib suddenly decides to decode a whole lot more channels, it will overflow the buffer we've allocated (and it ignores the buf_size parameter that we give it). I guess addi

Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Luca Barbato
On 14/08/15 16:06, Martin Storsjö wrote: Nope, and more problematically; if the lib suddenly decides to decode a whole lot more channels, it will overflow the buffer we've allocated (and it ignores the buf_size parameter that we give it). I guess adding some safeguard might be nice. lu _

Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Martin Storsjö
On Fri, 14 Aug 2015, Luca Barbato wrote: On 14/08/15 13:21, Martin Storsjö wrote: On Fri, 14 Aug 2015, Luca Barbato wrote: On 14/08/15 10:36, Martin Storsjö wrote: For ADTS streams, the output format (number of channels, frame size) can change at any point (with the latest version of fdk-aac

Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Luca Barbato
On 14/08/15 13:21, Martin Storsjö wrote: > On Fri, 14 Aug 2015, Luca Barbato wrote: > >> On 14/08/15 10:36, Martin Storsjö wrote: >>> For ADTS streams, the output format (number of channels, frame size) >>> can change at any point (with the latest version of fdk-aac, the decoder >>> seems to chang

Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Martin Storsjö
On Fri, 14 Aug 2015, Luca Barbato wrote: On 14/08/15 10:36, Martin Storsjö wrote: For ADTS streams, the output format (number of channels, frame size) can change at any point (with the latest version of fdk-aac, the decoder seems to change format after a handful of frames, not outputting the ri

Re: [libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Luca Barbato
On 14/08/15 10:36, Martin Storsjö wrote: > For ADTS streams, the output format (number of channels, frame size) > can change at any point (with the latest version of fdk-aac, the decoder > seems to change format after a handful of frames, not outputting the > right format immediately, for cases tha

[libav-devel] [PATCH 2/3] libfdk-aacdec: Always decode into an intermediate buffer

2015-08-14 Thread Martin Storsjö
For ADTS streams, the output format (number of channels, frame size) can change at any point (with the latest version of fdk-aac, the decoder seems to change format after a handful of frames, not outputting the right format immediately, for cases that worked fine with the earlier version of the lib