Opened 6 years ago

Closed 5 years ago

#3380 closed defect (fixed)

swresample segfault with 10-channel amerge+pan

Reported by: MarkZV Owned by:
Priority: important Component: swresample
Version: git-master Keywords: crash
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

A segmentation fault is encountered attempting to do some mixing between five stereo inputs using the amerge and pan filters. It should complete successfully without crashing.

The crash can be reproduced with the following command, using a stereo input file such as fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav (the same file can be used for all inputs):

$ ffmpeg -v 9 -loglevel 99 -i in.wav -i in.wav -i in.wav -i in.wav -i in.wav -filter_complex '[0:a] [1:a] [2:a] [3:a] [4:a] amerge=inputs=5,pan=stereo|FL=0.5*c0+0.2*c2+0.1*c4+0.1*c6+0.1*c8|FR=0.5*c1+0.2*c3+0.1*c5+0.1*c7+0.1*c9 [ac]' -map '[ac]' -t 5 -y out.ac3
ffmpeg version N-60525-gdfc99ca Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 10 2014 12:55:53 with gcc 4.8.2 (MacPots gcc48 4.8.2_0)
  configuration: --enable-debug --assert-level=2 --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype --mandir=/opt/local/share/man --enable-pthreads --cc=/opt/local/bin/gcc-mp-4.8 --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-nonfree --enable-libfdk-aac --enable-libfaac
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 31.100 / 55. 31.100
  libavdevice    55.  8.100 / 55.  8.100
  libavfilter     4.  1.102 /  4.  1.102
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'in.wav'.
Reading option '-i' ... matched as input file with argument 'in.wav'.
Reading option '-i' ... matched as input file with argument 'in.wav'.
Reading option '-i' ... matched as input file with argument 'in.wav'.
Reading option '-i' ... matched as input file with argument 'in.wav'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0:a] [1:a] [2:a] [3:a] [4:a] amerge=inputs=5,pan=stereo|FL=0.5*c0+0.2*c2+0.1*c4+0.1*c6+0.1*c8|FR=0.5*c1+0.2*c3+0.1*c5+0.1*c7+0.1*c9 [ac]'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '[ac]'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '5'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'out.ac3' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option filter_complex (create a complex filtergraph) with argument [0:a] [1:a] [2:a] [3:a] [4:a] amerge=inputs=5,pan=stereo|FL=0.5*c0+0.2*c2+0.1*c4+0.1*c6+0.1*c8|FR=0.5*c1+0.2*c3+0.1*c5+0.1*c7+0.1*c9 [ac].
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file in.wav.
Successfully parsed a group of options.
Opening an input file: in.wav.
[wav @ 0x103065600] Format wav probed with size=2048 and score=99
[wav @ 0x103065600] Before avformat_find_stream_info() pos: 46 bytes read:32768 seeks:0
[wav @ 0x103065600] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x103065600] probing stream 0 pp:4
[wav @ 0x103065600] probing stream 0 pp:3
[wav @ 0x103065600] probing stream 0 pp:2
[wav @ 0x103065600] probing stream 0 pp:1
[wav @ 0x103065600] probed stream 0
[wav @ 0x103065600] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x103065600] max_analyze_duration 5000000 reached at 5015510 microseconds
[wav @ 0x103065600] After avformat_find_stream_info() pos: 897070 bytes read:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #0:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: input file in.wav.
Successfully parsed a group of options.
Opening an input file: in.wav.
[wav @ 0x103084e00] Format wav probed with size=2048 and score=99
[wav @ 0x103084e00] Before avformat_find_stream_info() pos: 46 bytes read:32768 seeks:0
[wav @ 0x103084e00] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x103084e00] probing stream 0 pp:4
[wav @ 0x103084e00] probing stream 0 pp:3
[wav @ 0x103084e00] probing stream 0 pp:2
[wav @ 0x103084e00] probing stream 0 pp:1
[wav @ 0x103084e00] probed stream 0
[wav @ 0x103084e00] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x103084e00] max_analyze_duration 5000000 reached at 5015510 microseconds
[wav @ 0x103084e00] After avformat_find_stream_info() pos: 897070 bytes read:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #1:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: input file in.wav.
Successfully parsed a group of options.
Opening an input file: in.wav.
[wav @ 0x10318c800] Format wav probed with size=2048 and score=99
[wav @ 0x10318c800] Before avformat_find_stream_info() pos: 46 bytes read:32768 seeks:0
[wav @ 0x10318c800] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x10318c800] probing stream 0 pp:4
[wav @ 0x10318c800] probing stream 0 pp:3
[wav @ 0x10318c800] probing stream 0 pp:2
[wav @ 0x10318c800] probing stream 0 pp:1
[wav @ 0x10318c800] probed stream 0
[wav @ 0x10318c800] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x10318c800] max_analyze_duration 5000000 reached at 5015510 microseconds
[wav @ 0x10318c800] After avformat_find_stream_info() pos: 897070 bytes read:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #2.0 : stereo
Input #2, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #2:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: input file in.wav.
Successfully parsed a group of options.
Opening an input file: in.wav.
[wav @ 0x10306bc00] Format wav probed with size=2048 and score=99
[wav @ 0x10306bc00] Before avformat_find_stream_info() pos: 46 bytes read:32768 seeks:0
[wav @ 0x10306bc00] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x10306bc00] probing stream 0 pp:4
[wav @ 0x10306bc00] probing stream 0 pp:3
[wav @ 0x10306bc00] probing stream 0 pp:2
[wav @ 0x10306bc00] probing stream 0 pp:1
[wav @ 0x10306bc00] probed stream 0
[wav @ 0x10306bc00] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x10306bc00] max_analyze_duration 5000000 reached at 5015510 microseconds
[wav @ 0x10306bc00] After avformat_find_stream_info() pos: 897070 bytes read:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #3.0 : stereo
Input #3, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #3:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: input file in.wav.
Successfully parsed a group of options.
Opening an input file: in.wav.
[wav @ 0x10338f000] Format wav probed with size=2048 and score=99
[wav @ 0x10338f000] Before avformat_find_stream_info() pos: 46 bytes read:32768 seeks:0
[wav @ 0x10338f000] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x10338f000] probing stream 0 pp:4
[wav @ 0x10338f000] probing stream 0 pp:3
[wav @ 0x10338f000] probing stream 0 pp:2
[wav @ 0x10338f000] probing stream 0 pp:1
[wav @ 0x10338f000] probed stream 0
[wav @ 0x10338f000] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x10338f000] max_analyze_duration 5000000 reached at 5015510 microseconds
[wav @ 0x10338f000] After avformat_find_stream_info() pos: 897070 bytes read:917504 seeks:0 frames:218
Guessed Channel Layout for  Input Stream #4.0 : stereo
Input #4, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #4:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file out.ac3.
Applying option map (set input stream mapping) with argument [ac].
Applying option t (record or transcode "duration" seconds of audio/video) with argument 5.
Successfully parsed a group of options.
Opening an output file: out.ac3.
detected 4 logical cores
[Parsed_amerge_0 @ 0x102a59260] Setting 'inputs' to value '5'
[Parsed_pan_1 @ 0x102a59540] compat: called with args=[stereo|FL=0.5*c0+0.2*c2+0.1*c4+0.1*c6+0.1*c8|FR=0.5*c1+0.2*c3+0.1*c5+0.1*c7+0.1*c9]
[Parsed_pan_1 @ 0x102a59540] Setting 'args' to value 'stereo|FL=0.5*c0+0.2*c2+0.1*c4+0.1*c6+0.1*c8|FR=0.5*c1+0.2*c3+0.1*c5+0.1*c7+0.1*c9'
[graph 0 input from stream 0:0 @ 0x102a59660] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 0:0 @ 0x102a59660] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 0:0 @ 0x102a59660] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 0:0 @ 0x102a59660] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0x102a59660] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[graph 0 input from stream 1:0 @ 0x102a59f00] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 1:0 @ 0x102a59f00] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 1:0 @ 0x102a59f00] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 1:0 @ 0x102a59f00] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 1:0 @ 0x102a59f00] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[graph 0 input from stream 2:0 @ 0x102a5a380] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 2:0 @ 0x102a5a380] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 2:0 @ 0x102a5a380] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 2:0 @ 0x102a5a380] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 2:0 @ 0x102a5a380] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[graph 0 input from stream 3:0 @ 0x102a5a5a0] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 3:0 @ 0x102a5a5a0] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 3:0 @ 0x102a5a5a0] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 3:0 @ 0x102a5a5a0] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 3:0 @ 0x102a5a5a0] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[graph 0 input from stream 4:0 @ 0x102a5a8a0] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 4:0 @ 0x102a5a8a0] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 4:0 @ 0x102a5a8a0] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 4:0 @ 0x102a5a8a0] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 4:0 @ 0x102a5a8a0] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0x102a5b140] Setting 'sample_fmts' to value 'fltp'
[audio format for output stream 0:0 @ 0x102a5b140] Setting 'channel_layouts' to value '0x4|0x3|0x103|0x7|0x603|0x33|0x107|0x607|0x37|0xc|0xb|0x10b|0xf|0x60b|0x3b|0x10f|0x60f|0x3f'
Successfully opened the file.
[Parsed_amerge_0 @ 0x102a59260] No channel layout for input 1
[AVFilterGraph @ 0x102a59100] query_formats: 9 queried, 9 merged, 0 already done, 18 delayed
[AVFilterGraph @ 0x102a59100] query_formats not finished
[Parsed_amerge_0 @ 0x102a59260] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[Parsed_pan_1 @ 0x102a59540] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_amerge_0' and the filter 'Parsed_pan_1'
[AVFilterGraph @ 0x102a59100] query_formats: 1 queried, 15 merged, 12 already done, 0 delayed
[Parsed_amerge_0 @ 0x102a59260] in0:stereo + in1:stereo + in2:stereo + in3:stereo + in4:stereo -> out:10 channels (FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL)
[auto-inserted resampler 0 @ 0x102a11c00] ch:10 chl:10 channels (FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL) fmt:s16 r:44100Hz -> ch:10 chl:10 channels (FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL) fmt:fltp r:44100Hz
[Parsed_pan_1 @ 0x102a59540] o0 = 0.5 i0 + 0 i1 + 0.2 i2 + 0 i3 + 0.1 i4 + 0 i5 + 0.1 i6 + 0 i7 + 0.1 i8 + 0 i9
[Parsed_pan_1 @ 0x102a59540] o1 = 0 i0 + 0.5 i1 + 0 i2 + 0.2 i3 + 0 i4 + 0.1 i5 + 0 i6 + 0.1 i7 + 0 i8 + 0.1 i9
Output #0, ac3, to 'out.ac3':
  Metadata:
    encoder         : Lavf55.31.100
    Stream #0:0, 0, 1/90000: Audio: ac3, 44100 Hz, stereo, fltp, 192 kb/s (default)
Stream mapping:
  Stream #0:0 (pcm_s16le) -> amerge:in0
  Stream #1:0 (pcm_s16le) -> amerge:in1
  Stream #2:0 (pcm_s16le) -> amerge:in2
  Stream #3:0 (pcm_s16le) -> amerge:in3
  Stream #4:0 (pcm_s16le) -> amerge:in4
  pan -> Stream #0:0 (ac3)
Press [q] to stop, [?] for help
Segmentation fault
$ 
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000001080
0x000000010074ae17 in swri_rematrix (s=0x103085400, out=0x103087000, in=0x103086b80, len=1024, mustcopy=1) at libswresample/rematrix.c:474
474	                        v+= ((float*)in->ch[in_i])[i] * s->matrix[out_i][in_i];
(gdb) bt
#0  0x000000010074ae17 in swri_rematrix (s=0x103085400, out=0x103087000, in=0x103086b80, len=1024, mustcopy=1) at libswresample/rematrix.c:474
#1  0x000000010074f16e in swr_convert_internal (s=0x103085400, out=0x103087000, out_count=1024, in=0x103086b80, in_count=1024) at libswresample/swresample.c:681
(gdb) p in->ch
$1 = {0x10400a000 "", 0x10400b200 "", 0x10400c400 "", 0x10400d600 "", 0x10400e800 "", 0x10400fa00 "", 0x104010c00 "", 0x104011e00 "", 0x1080 <Address 0x1080 out of bounds>, 0x0 <repeats 23 times>}
(gdb) 

This longer stack trace is from a slightly older version with a different input file:

0x000000010080086c swri_rematrix + 1084 (rematrix.c:474)
0x0000000100805f71 swr_convert_internal + 577 (swresample.c:689)
0x0000000100806a80 swr_convert + 1392 (swresample.c:822)
0x00000001000308c9 filter_frame + 105 (af_pan.c:374)
0x000000010003ae0e ff_filter_frame_framed + 590 (avfilter.c:1081)
0x000000010003b1d3 ff_filter_frame + 67 (avfilter.c:1163)
0x00000001000262df filter_frame + 399 (af_aresample.c:215)
0x000000010003ae0e ff_filter_frame_framed + 590 (avfilter.c:1081)
0x000000010003b1d3 ff_filter_frame + 67 (avfilter.c:1163)
0x0000000100023c82 filter_frame + 2290 (af_amerge.c:303)
0x000000010003ae0e ff_filter_frame_framed + 590 (avfilter.c:1081)
0x000000010003b1d3 ff_filter_frame + 67 (avfilter.c:1163)
0x000000010003f74f request_frame + 63 (buffersrc.c:501)
0x000000010003fd31 av_buffersrc_add_frame_internal + 305 (buffersrc.c:181)
0x000000010003fe8f av_buffersrc_add_frame_flags + 79 (buffersrc.c:106)
0x00000001000171a6 output_packet + 7542 (ffmpeg.c:1716)
0x00000001000189fa process_input + 4378 (ffmpeg.c:3270)
0x000000010001b20f transcode_step + 383 (ffmpeg.c:3364)
0x000000010001d177 transcode + 7463 (ffmpeg.c:3417)
0x000000010001dd16 main + 230 (ffmpeg.c:3596)
0x0000000100001014 start + 52

Change History (6)

comment:1 Changed 6 years ago by cehoyos

  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
$ valgrind ./ffmpeg_g -i fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav -filter_complex 'asplit=5,amerge=inputs=5,pan=stereo|FL=c8|FR=c1' -acodec ac3 -f null -
==12487== Memcheck, a memory error detector
==12487== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==12487== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==12487== Command: ./ffmpeg_g -i fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav -filter_complex asplit=5,amerge=inputs=5,pan=stereo|FL=c8|FR=c1 -acodec ac3 -f null -
==12487==
ffmpeg version N-60530-g6c12b1d Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 11 2014 14:27:58 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 31.100 / 55. 31.100
  libavdevice    55.  8.100 / 55.  8.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
[Parsed_amerge_1 @ 0x759d3e0] No channel layout for input 1
[Parsed_amerge_1 @ 0x759d3e0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[Parsed_pan_2 @ 0x759fcc0] Pure channel mapping detected: 8 1
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.31.100
    Stream #0:0: Audio: ac3, 44100 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 (pcm_s16le) -> asplit
  pan -> Stream #0:0 (ac3)
Press [q] to stop, [?] for help
==12487== Invalid read of size 4
==12487==    at 0xCAE940: conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT (audioconvert.c:72)
==12487==    by 0xCAF6CD: swri_audio_convert (audioconvert.c:221)
==12487==    by 0xCAC1FA: swr_convert_internal.part.3 (swresample.c:674)
==12487==    by 0xCACFCA: swr_convert (swresample.c:523)
==12487==    by 0x4EC7C3: filter_frame (af_pan.c:373)
==12487==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==12487==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==12487==    by 0x4E4D02: filter_frame (af_aresample.c:215)
==12487==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==12487==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==12487==    by 0x4E288F: filter_frame (af_amerge.c:303)
==12487==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==12487==  Address 0x1080 is not stack'd, malloc'd or (recently) free'd
==12487==
==12487==
==12487== Process terminating with default action of signal 11 (SIGSEGV)
==12487==  Access not within mapped region at address 0x1080
==12487==    at 0xCAE940: conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT (audioconvert.c:72)
==12487==    by 0xCAF6CD: swri_audio_convert (audioconvert.c:221)
==12487==    by 0xCAC1FA: swr_convert_internal.part.3 (swresample.c:674)
==12487==    by 0xCACFCA: swr_convert (swresample.c:523)
==12487==    by 0x4EC7C3: filter_frame (af_pan.c:373)
==12487==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==12487==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==12487==    by 0x4E4D02: filter_frame (af_aresample.c:215)
==12487==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==12487==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==12487==    by 0x4E288F: filter_frame (af_amerge.c:303)
==12487==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==12487==  If you believe this happened as a result of a stack
==12487==  overflow in your program's main thread (unlikely but
==12487==  possible), you can try to increase the size of the
==12487==  main thread stack using the --main-stacksize= flag.
==12487==  The main thread stack size used in this run was 8388608.
==12487==
==12487== HEAP SUMMARY:
==12487==     in use at exit: 1,296,833 bytes in 1,161 blocks
==12487==   total heap usage: 2,021 allocs, 860 frees, 1,717,937 bytes allocated
==12487==
==12487== LEAK SUMMARY:
==12487==    definitely lost: 0 bytes in 0 blocks
==12487==    indirectly lost: 0 bytes in 0 blocks
==12487==      possibly lost: 2,448 bytes in 9 blocks
==12487==    still reachable: 1,294,385 bytes in 1,152 blocks
==12487==         suppressed: 0 bytes in 0 blocks
==12487== Rerun with --leak-check=full to see details of leaked memory
==12487==
==12487== For counts of detected and suppressed errors, rerun with: -v
==12487== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
Killed
(gdb) r -i fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav -filter_complex 'asplit=5,amerge=inputs=5,pan=stereo|FL=c8|FR=c1' -acodec ac3 -f null -
Starting program: /home/cehoyos/test/cehoyos/FFmpeg/ffmpeg_g -i fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav -filter_complex 'asplit=5,amerge=inputs=5,pan=stereo|FL=c8|FR=c1' -acodec ac3 -f null -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-60530-g6c12b1d Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 11 2014 14:27:58 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 31.100 / 55. 31.100
  libavdevice    55.  8.100 / 55.  8.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
[New Thread 0x7ffff57e5700 (LWP 12520)]
[New Thread 0x7ffff4fe4700 (LWP 12521)]
[New Thread 0x7ffff47e3700 (LWP 12522)]
[New Thread 0x7ffff3fe2700 (LWP 12523)]
[New Thread 0x7ffff37e1700 (LWP 12524)]
[New Thread 0x7ffff2fe0700 (LWP 12525)]
[New Thread 0x7ffff27df700 (LWP 12526)]
[New Thread 0x7ffff1fde700 (LWP 12527)]
[New Thread 0x7ffff17dd700 (LWP 12528)]
[Parsed_amerge_1 @ 0x18e6be0] No channel layout for input 1
[Parsed_amerge_1 @ 0x18e6be0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[Parsed_pan_2 @ 0x18da560] Pure channel mapping detected: 8 1
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.31.100
    Stream #0:0: Audio: ac3, 44100 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 (pcm_s16le) -> asplit
  pan -> Stream #0:0 (ac3)
Press [q] to stop, [?] for help

Program received signal SIGSEGV, Segmentation fault.
0x0000000000cae940 in conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT (po=0x19fbbc0 "",
    pi=0x1080 <Address 0x1080 out of bounds>, is=4, os=4, end=0x19fcbc0 "")
    at libswresample/audioconvert.c:72
72      CONV_FUNC(AV_SAMPLE_FMT_FLT, float  , AV_SAMPLE_FMT_FLT, *(const float*)pi)
(gdb) bt
#0  0x0000000000cae940 in conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT (po=0x19fbbc0 "",
    pi=0x1080 <Address 0x1080 out of bounds>, is=4, os=4, end=0x19fcbc0 "")
    at libswresample/audioconvert.c:72
#1  0x0000000000caf6ce in swri_audio_convert (ctx=0x19dd060, out=out@entry=0x18c32c0,
    in=in@entry=0x18c2e40, len=len@entry=1024) at libswresample/audioconvert.c:221
#2  0x0000000000cac1fb in swr_convert_internal (s=s@entry=0x18c16c0, out=0x18c32c0,
    out_count=out_count@entry=1024, in=in@entry=0x18c2e40, in_count=in_count@entry=1024)
    at libswresample/swresample.c:674
#3  0x0000000000cacfcb in buf_set (count=<optimized out>, in=<optimized out>,
    out=<optimized out>) at libswresample/swresample.c:523
#4  buf_set (count=<optimized out>, in=<optimized out>, out=<optimized out>)
    at libswresample/swresample.c:742
#5  swr_convert (s=0x18c16c0, out_arg=out_arg@entry=0x19ecb80,
    out_count=<optimized out>, out_count@entry=1024, in_arg=<optimized out>,
    in_count=in_count@entry=1024) at libswresample/swresample.c:825
#6  0x00000000004ec7c4 in filter_frame (inlink=inlink@entry=0x19dce80,
    insamples=0x19eb460) at libavfilter/af_pan.c:373
#7  0x000000000048d12a in ff_filter_frame_framed (link=link@entry=0x19dce80,
    frame=0x1080, frame@entry=0x19eb460) at libavfilter/avfilter.c:1081
#8  0x000000000048e229 in ff_filter_frame (link=link@entry=0x19dce80, frame=0x19eb460)
    at libavfilter/avfilter.c:1161
#9  0x00000000004e4d03 in filter_frame (inlink=inlink@entry=0x18e6aa0,
    insamplesref=0x19ed100) at libavfilter/af_aresample.c:215
#10 0x000000000048d12a in ff_filter_frame_framed (link=link@entry=0x18e6aa0,
    frame=0x1080, frame@entry=0x19ed100) at libavfilter/avfilter.c:1081
#11 0x000000000048e229 in ff_filter_frame (link=0x18e6aa0, frame=frame@entry=0x19ed100)
    at libavfilter/avfilter.c:1161
#12 0x00000000004e2890 in filter_frame (inlink=inlink@entry=0x18e7b00, insamples=0x0)
    at libavfilter/af_amerge.c:303
#13 0x000000000048d12a in ff_filter_frame_framed (link=link@entry=0x18e7b00,
    frame=0x1080, frame@entry=0x19ecb60) at libavfilter/avfilter.c:1081
#14 0x000000000048e229 in ff_filter_frame (link=0x18e7b00, frame=0x19ecb60)
    at libavfilter/avfilter.c:1161
#15 0x000000000049b82e in filter_frame (inlink=inlink@entry=0x18e8dc0, frame=0x1080)
    at libavfilter/split.c:86
#16 0x000000000048d12a in ff_filter_frame_framed (link=link@entry=0x18e8dc0,
    frame=0x1080, frame@entry=0x19eb1e0) at libavfilter/avfilter.c:1081
#17 0x000000000048e229 in ff_filter_frame (link=link@entry=0x18e8dc0, frame=0x19eb1e0)
    at libavfilter/avfilter.c:1161
#18 0x00000000004922e2 in request_frame (link=0x18e8dc0) at libavfilter/buffersrc.c:500
#19 0x000000000049257b in av_buffersrc_add_frame_internal (ctx=ctx@entry=0x18e7d40,
    frame=frame@entry=0x19e9be0, flags=flags@entry=4) at libavfilter/buffersrc.c:181
#20 0x000000000049290d in av_buffersrc_add_frame_flags (ctx=0x18e7d40,
    frame=frame@entry=0x19e9be0, flags=flags@entry=4) at libavfilter/buffersrc.c:106
#21 0x000000000047dc06 in decode_audio (ist=ist@entry=0x18da680,
    pkt=pkt@entry=0x7fffffffd9e0, got_output=got_output@entry=0x7fffffffd75c)
    at ffmpeg.c:1718
#22 0x00000000004802ce in output_packet (pkt=0x7fffffffd980, ist=0x18da680)
    at ffmpeg.c:1958
#23 process_input (file_index=<optimized out>) at ffmpeg.c:3272
#24 0x00000000004669b0 in transcode_step () at ffmpeg.c:3366
#25 transcode () at ffmpeg.c:3418
#26 main (argc=<optimized out>, argv=<optimized out>) at ffmpeg.c:3598
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0xcae920 to 0xcae960:
   0x0000000000cae920 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+16>: cli
   0x0000000000cae921 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+17>: push   %rbx
   0x0000000000cae922 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+18>: jbe    0xcae974 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+100>
   0x0000000000cae924 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+20>: movslq %edx,%r9
   0x0000000000cae927 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+23>: movslq %ecx,%rax
   0x0000000000cae92a <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+26>: lea    (%r9,%r9,2),%rbx
   0x0000000000cae92e <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+30>: lea    (%rax,%rax,2),%r11
   0x0000000000cae932 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+34>: lea    (%rbx,%r9,1),%r12
   0x0000000000cae936 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+38>: lea    (%r11,%rax,1),%rbp
   0x0000000000cae93a <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+42>: nopw   0x0(%rax,%rax,1)
=> 0x0000000000cae940 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+48>: movss  (%rsi),%xmm0
   0x0000000000cae944 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+52>: movss  %xmm0,(%rdi)
   0x0000000000cae948 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+56>: movss  (%rsi,%r9,1),%xmm0
   0x0000000000cae94e <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+62>: movss  %xmm0,(%rdi,%rax,1)
   0x0000000000cae953 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+67>: movss  (%rsi,%r9,2),%xmm0
   0x0000000000cae959 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+73>: movss  %xmm0,(%rdi,%rax,2)
   0x0000000000cae95e <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+78>: movss  (%rsi,%rbx,1),%xmm0
End of assembler dump.
(gdb) info all-register
rax            0x4      4
rbx            0xc      12
rcx            0x4      4
rdx            0x4      4
rsi            0x1080   4224
rdi            0x19fbbc0        27245504
rbp            0x10     0x10
rsp            0x7fffffffc6a0   0x7fffffffc6a0
r8             0x19fcbc0        27249600
r9             0x4      4
r10            0x19fcbb4        27249588
r11            0xc      12
r12            0x10     16
r13            0x0      0
r14            0x18c2e40        25964096
r15            0x19dd060        27119712
rip            0xcae940 0xcae940 <conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT+48>
eflags         0x10202  [ IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
st0            0        (raw 0x00000000000000000000)
st1            0        (raw 0x00000000000000000000)
st2            0        (raw 0x00000000000000000000)
st3            0        (raw 0x00000000000000000000)
st4            0        (raw 0x00000000000000000000)
st5            0        (raw 0x00000000000000000000)
st6            -0.9999423496760239040304779623014042    (raw 0xbffefffc38c9be717774)
st7            0.010737659167264410497924910590367142   (raw 0x3ff8afed01bd602d8ed9)
fctrl          0x37f    895
fstat          0x220    544
ftag           0xffff   65535
fiseg          0x7fff   32767
fioff          0xf680a4a7       -159341401
foseg          0x7fff   32767
fooff          0xffff91b8       -28232
fop            0x0      0
mxcsr          0x1fa0   [ PE IM DM ZM OM UM PM ]
ymm0           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}}
ymm1           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x25 <repeats 16 times>, 0x0 <repeats 16 times>}, v16_int16 = {0x2525, 0x2525, 0x2525, 0x2525, 0x2525, 0x2525, 0x2525, 0x2525, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0x25252525, 0x25252525, 0x25252525, 0x25252525, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x2525252525252525, 0x2525252525252525, 0x0, 0x0}, v2_int128 = {0x25252525252525252525252525252525, 0x00000000000000000000000000000000}}
ymm2           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}}
ymm3           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0 <repeats 25 times>}, v16_int16 = {0x0, 0x0, 0x0, 0xff, 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0xff0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xff000000000000, 0x0, 0x0, 0x0}, v2_int128 = {0x000000000000000000ff000000000000, 0x00000000000000000000000000000000}}
ymm4           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x8000000000000000, 0x0, 0x0, 0x0}, v32_int8 = {0xdc, 0xff, 0xf2, 0xff, 0xd9, 0xff, 0xec, 0xff, 0xe5, 0xff, 0x22, 0x0, 0xed, 0xff, 0x11, 0x0 <repeats 17 times>}, v16_int16 = {0xffdc, 0xfff2, 0xffd9, 0xffec, 0xffe5, 0x22, 0xffed, 0x11, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v8_int32 = {0xfff2ffdc, 0xffecffd9, 0x22ffe5, 0x11ffed, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xffecffd9fff2ffdc, 0x11ffed0022ffe5, 0x0, 0x0}, v2_int128 = {0x0011ffed0022ffe5ffecffd9fff2ffdc, 0x00000000000000000000000000000000}}
ymm5           {v8_float = {0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x1, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3f, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0, 0x3ff0, 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x3ff00000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3ff0000000000000, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000003ff0000000000000, 0x00000000000000000000000000000000}}
ymm6           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}}
ymm7           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x7, 0x5c, 0x14, 0x33, 0x26, 0xa6, 0x91, 0x3c, 0x0 <repeats 24 times>}, v16_int16 = {0x5c07, 0x3314, 0xa626, 0x3c91, 0x0 <repeats 12 times>}, v8_int32 = {0x33145c07, 0x3c91a626, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x3c91a62633145c07, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000003c91a62633145c07, 0x00000000000000000000000000000000}}
ymm8           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0, 0x8000, 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x80000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x8000000000000000, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000008000000000000000, 0x00000000000000000000000000000000}}
ymm9           {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0x0, 0x0, 0x8000, 0x0 <repeats 12 times>}, v8_int32 = {0x0, 0x80000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x8000000000000000, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000008000000000000000, 0x00000000000000000000000000000000}}
ymm10          {v8_float = {0xffffcfa4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x16, 0x70, 0x41, 0xc6, 0x58, 0xac, 0x98, 0xb5, 0x0 <repeats 24 times>}, v16_int16 = {0x7016, 0xc641, 0xac58, 0xb598, 0x0 <repeats 12 times>}, v8_int32 = {0xc6417016, 0xb598ac58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xb598ac58c6417016, 0x0, 0x0, 0x0}, v2_int128 = {0x0000000000000000b598ac58c6417016, 0x00000000000000000000000000000000}}
ymm11          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0, 0x0, 0x0, 0xb8, 0x76, 0x19, 0x1f, 0xb9, 0x0 <repeats 24 times>}, v16_int16 = {0x0, 0xb800, 0x1976, 0xb91f, 0x0 <repeats 12 times>}, v8_int32 = {0xb8000000, 0xb91f1976, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xb91f1976b8000000, 0x0, 0x0, 0x0}, v2_int128 = {0x0000000000000000b91f1976b8000000, 0x00000000000000000000000000000000}}
ymm12          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}}
ymm13          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0x0 <repeats 32 times>}, v16_int16 = {0x0 <repeats 16 times>}, v8_int32 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0x0, 0x0, 0x0, 0x0}, v2_int128 = {0x00000000000000000000000000000000, 0x00000000000000000000000000000000}}
ymm14          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xa0, 0x83, 0x47, 0x3, 0x1d, 0x3c, 0x8a, 0xb5, 0x0 <repeats 24 times>}, v16_int16 = {0x83a0, 0x347, 0x3c1d, 0xb58a, 0x0 <repeats 12 times>}, v8_int32 = {0x34783a0, 0xb58a3c1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xb58a3c1d034783a0, 0x0, 0x0, 0x0}, v2_int128 = {0x0000000000000000b58a3c1d034783a0, 0x00000000000000000000000000000000}}
ymm15          {v8_float = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_double = {0x0, 0x0, 0x0, 0x0}, v32_int8 = {0xa0, 0x83, 0x47, 0x3, 0x1d, 0x3c, 0xaa, 0xb5, 0x0 <repeats 24 times>}, v16_int16 = {0x83a0, 0x347, 0x3c1d, 0xb5aa, 0x0 <repeats 12 times>}, v8_int32 = {0x34783a0, 0xb5aa3c1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int64 = {0xb5aa3c1d034783a0, 0x0, 0x0, 0x0}, v2_int128 = {0x0000000000000000b5aa3c1d034783a0, 0x00000000000000000000000000000000}}

comment:2 Changed 6 years ago by cehoyos

  • Keywords crash added

comment:3 Changed 6 years ago by cehoyos

$ cp fate-suite/audio-reference/luckynight_2ch_44kHz_s16.wav in.wav
$ valgrind ./ffmpeg_g -i in.wav -i in.wav -i in.wav -i in.wav -i in.wav -filter_complex 'amerge=inputs=5,pan=stereo|FL=0.5*c0+0.2*c2+0.1*c8|FR=c9' -acodec ac3 -f null -
==13549== Memcheck, a memory error detector
==13549== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==13549== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==13549== Command: ./ffmpeg_g -i in.wav -i in.wav -i in.wav -i in.wav -i in.wav -filter_complex amerge=inputs=5,pan=stereo|FL=0.5*c0+0.2*c2+0.1*c8|FR=c9 -acodec ac3 -f null -
==13549==
ffmpeg version N-60530-g6c12b1d Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 11 2014 14:27:58 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 31.100 / 55. 31.100
  libavdevice    55.  8.100 / 55.  8.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for  Input Stream #2.0 : stereo
Input #2, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #2:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for  Input Stream #3.0 : stereo
Input #3, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #3:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for  Input Stream #4.0 : stereo
Input #4, wav, from 'in.wav':
  Duration: 00:00:09.50, bitrate: 1411 kb/s
    Stream #4:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
[Parsed_amerge_0 @ 0x7b40320] No channel layout for input 1
[Parsed_amerge_0 @ 0x7b40320] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.31.100
    Stream #0:0: Audio: ac3, 44100 Hz, stereo, fltp, 192 kb/s (default)
Stream mapping:
  Stream #0:0 (pcm_s16le) -> amerge:in0
  Stream #1:0 (pcm_s16le) -> amerge:in1
  Stream #2:0 (pcm_s16le) -> amerge:in2
  Stream #3:0 (pcm_s16le) -> amerge:in3
  Stream #4:0 (pcm_s16le) -> amerge:in4
  pan -> Stream #0:0 (ac3)
Press [q] to stop, [?] for help
==13549== Invalid read of size 4
==13549==    at 0xCAB257: swri_rematrix (rematrix.c:474)
==13549==    by 0xCAC257: swr_convert_internal.part.3 (swresample.c:681)
==13549==    by 0xCACFCA: swr_convert (swresample.c:523)
==13549==    by 0x4EC7C3: filter_frame (af_pan.c:373)
==13549==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==13549==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==13549==    by 0x4E4D02: filter_frame (af_aresample.c:215)
==13549==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==13549==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==13549==    by 0x4E288F: filter_frame (af_amerge.c:303)
==13549==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==13549==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==13549==  Address 0x1080 is not stack'd, malloc'd or (recently) free'd
==13549==
==13549==
==13549== Process terminating with default action of signal 11 (SIGSEGV)
==13549==  Access not within mapped region at address 0x1080
==13549==    at 0xCAB257: swri_rematrix (rematrix.c:474)
==13549==    by 0xCAC257: swr_convert_internal.part.3 (swresample.c:681)
==13549==    by 0xCACFCA: swr_convert (swresample.c:523)
==13549==    by 0x4EC7C3: filter_frame (af_pan.c:373)
==13549==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==13549==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==13549==    by 0x4E4D02: filter_frame (af_aresample.c:215)
==13549==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==13549==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==13549==    by 0x4E288F: filter_frame (af_amerge.c:303)
==13549==    by 0x48D129: ff_filter_frame_framed (avfilter.c:1081)
==13549==    by 0x48E228: ff_filter_frame (avfilter.c:1161)
==13549==  If you believe this happened as a result of a stack
==13549==  overflow in your program's main thread (unlikely but
==13549==  possible), you can try to increase the size of the
==13549==  main thread stack using the --main-stacksize= flag.
==13549==  The main thread stack size used in this run was 8388608.
==13549==
==13549== HEAP SUMMARY:
==13549==     in use at exit: 5,358,575 bytes in 4,748 blocks
==13549==   total heap usage: 7,189 allocs, 2,441 frees, 7,141,529 bytes allocated
==13549==
==13549== LEAK SUMMARY:
==13549==    definitely lost: 0 bytes in 0 blocks
==13549==    indirectly lost: 0 bytes in 0 blocks
==13549==      possibly lost: 3,808 bytes in 14 blocks
==13549==    still reachable: 5,354,767 bytes in 4,734 blocks
==13549==         suppressed: 0 bytes in 0 blocks
==13549== Rerun with --leak-check=full to see details of leaked memory
==13549==
==13549== For counts of detected and suppressed errors, rerun with: -v
==13549== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
Killed

comment:4 Changed 6 years ago by Cigaes

I sent a patch on the mailing-list. Please confirm if it fixes the problem for you.
http://ffmpeg.org/pipermail/ffmpeg-devel/2014-February/154356.html

comment:5 Changed 6 years ago by MarkZV

Thanks! I tried the patch and it seems to be working now.

comment:6 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed by Nicolas in 6c27aea8

Note: See TracTickets for help on using tickets.