[FFmpeg-devel] [PATCH] aacenc: Segmentation fault when frame contains samples with NaN values.

Michael Niedermayer michaelni at gmx.at
Sat Mar 8 01:48:19 CET 2014

On Fri, Mar 07, 2014 at 04:41:19PM +0100, Anders Rein wrote:
> On 03/07/2014 04:16 PM, Michael Niedermayer wrote:
> >On Fri, Mar 07, 2014 at 04:08:25PM +0100, Anders Rein wrote:
> >>The ffmpeg executable gave a segmentation fault when transcoding a
> >>wmv file to mp4 (h264, aac). The segfault happend in the aac encoder
> >>code and was caused by the wma2 decoder returning NaN samples. I
> >>tried to find the bug in the wma2 decoder, but eventually gave up. I
> >>did however add float clamping and checking for NaN in the aac
> >>encoder to make it more robust and avoid segmentation faults.
> >How can the NaN sample production be reproduced ?
> >I dont think decoders should return NaN samples
> Here is a link to the input file (I stripped away most of the file
> plus the video stream for copyright reasons):
> https://www.dropbox.com/s/4zzp03yes94mnrl/nan_example.wma
> Command line to reproduce the segmentation fault:
> ffmpeg -i nan_example.wma -acodec aac -strict -2 out.mp4



> While I agree that decoders shouldn't return NaN samples, I also
> don't see any reason to make the aac encoder more robust. An encoder
> shouldn't segfault no matter what data is put into it right?

It would be preferrable if it doesnt segfault, yes

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20140308/87e1585c/attachment.asc>

More information about the ffmpeg-devel mailing list