Found !
* A52 plugin allocates an input buffer at pcm_a52.c:556:
if (av_samples_alloc(rec->frame->data, rec->frame->linesize,
io->channels, rec->avctx->frame_size,
rec->avctx->sample_fmt, 0) < 0)
* The last parameter which equals 0 is "align":
http://libav.org/doxygen/master/samplefmt_8h.html#a4db4c77f928d32c7d8854732f50b8c04
* The problem is in libavutil::av_samples_get_buffer_size(). The parameter
"align" is not checked if it equals 0. And the following crash, division by 0
if (nb_channels > INT_MAX / align ||
* I suggest the following patch, based on FFMpeg source code:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavutil/samplefmt.c;h=08ecc834678eced8c3029095a824d8ae9d29406a;hb=HEAD#l137
* I tested it on Ubuntu 13.10 64 bit and it works :-)
---------------------------
Libav patch
---------------------------
--- libavutil/samplefmt_origine.c 2013-05-12 09:08:17.000000000 +0200
+++ libavutil/samplefmt.c 2014-01-21 20:04:45.272527345 +0100
@@ -104,6 +104,12 @@
if (!sample_size || nb_samples <= 0 || nb_channels <= 0)
return AVERROR(EINVAL);
+ /* auto-select alignment if not specified */
+ if (!align) {
+ align = 1;
+ nb_samples = FFALIGN(nb_samples, 32);
+ }
+
/* check for integer overflow */
if (nb_channels > INT_MAX / align ||
(int64_t)nb_channels * nb_samples > (INT_MAX - (align * nb_channels))
/ sample_size)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1241439
Title:
[a52 plugin] no sound/audio, traps: pulseaudio[25921] trap divide
error ip:7fe46a303a57 sp:7fff825b91d0 error:0 in libavutil.so.51.22.1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/alsa-plugins/+bug/1241439/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs