Opened 6 years ago

Closed 6 years ago

#7050 closed defect (fixed)

ffmpeg crashes when trying to use alimiter=attack=0.1 on material with samplerate 8 kHz

Reported by: Rollinnn Owned by:
Priority: important Component: avfilter
Version: git-master Keywords: alimiter crash fpe
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
ffmpeg crashes when trying to use -af alimiter=attack=0.1 on material with samplerate 8 kHz. I understand that it is not possible to actually use attack time 0.1 ms on samplerate 8 KHz, but i guess that crash is not valid behavior. ffmpeg is static windows build from Zeranoe. Link to file with samplerate 8 KHz - https://www.dropbox.com/s/q0zrz09biqlmql7/m1%208%20KHz.wav?dl=1.

How to reproduce:
ffmpeg -i C:\00\m1.wav -af alimiter=attack=0.1 C:\00\m2.wav
ffmpeg version N-90173-gfa0c9d69d3 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 13.100 / 58. 13.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100

Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'C:\00\m1.wav':

Duration: 00:00:01.00, bitrate: 256 kb/s

Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, stereo, s16, 256 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))

Press [q] to stop, ? for help

Attachments (1)

m1 8 KHz.wav (31.3 KB ) - added by Rollinnn 6 years ago.

Download all attachments as: .zip

Change History (3)

by Rollinnn, 6 years ago

Attachment: m1 8 KHz.wav added

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: undeterminedavfilter
Keywords: alimiter crash fpe added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
(gdb) r -i m1\ 8\ KHz.wav -af alimiter=attack=0.1 -f null -
Starting program: ffmpeg_g -i m1\ 8\ KHz.wav -af alimiter=attack=0.1 -f null -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-90182-g40102a2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl
  libavutil      56.  7.101 / 56.  7.101
  libavcodec     58. 13.100 / 58. 13.100
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'm1 8 KHz.wav':
  Duration: 00:00:01.00, bitrate: 256 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, stereo, s16, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[New Thread 0x7ffff515c700 (LWP 32560)]
[New Thread 0x7ffff495b700 (LWP 32561)]
[New Thread 0x7ffff415a700 (LWP 32562)]
[New Thread 0x7ffff3959700 (LWP 32563)]
[New Thread 0x7ffff3158700 (LWP 32564)]
[New Thread 0x7ffff2957700 (LWP 32565)]
[New Thread 0x7ffff2156700 (LWP 32566)]
[New Thread 0x7ffff1955700 (LWP 32567)]

Program received signal SIGFPE, Arithmetic exception.
0x00000000005b6137 in filter_frame (inlink=inlink@entry=0x2046040, in=<optimized out>) at libavfilter/af_alimiter.c:200
200             buf = &s->buffer[(s->pos + channels) % buffer_size];
(gdb) bt
#0  0x00000000005b6137 in filter_frame (inlink=inlink@entry=0x2046040, in=<optimized out>) at libavfilter/af_alimiter.c:200
#1  0x00000000004c03fa in ff_filter_frame_framed (frame=<optimized out>, link=0x2046040) at libavfilter/avfilter.c:1115
#2  ff_filter_frame_to_filter (link=0x2046040) at libavfilter/avfilter.c:1263
#3  ff_filter_activate_default (filter=<optimized out>) at libavfilter/avfilter.c:1312
#4  ff_filter_activate (filter=<optimized out>) at libavfilter/avfilter.c:1473
#5  0x00000000004c3b9c in ff_filter_graph_run_once (graph=graph@entry=0x202c500) at libavfilter/avfiltergraph.c:1453
#6  0x00000000004c4c0c in push_frame (graph=0x202c500) at libavfilter/buffersrc.c:181
#7  av_buffersrc_add_frame_internal (ctx=ctx@entry=0x2044880, frame=frame@entry=0x2041bc0, flags=flags@entry=4)
    at libavfilter/buffersrc.c:255
#8  0x00000000004c50bd in av_buffersrc_add_frame_flags (ctx=0x2044880, frame=frame@entry=0x2041bc0, flags=flags@entry=4)
    at libavfilter/buffersrc.c:164
#9  0x000000000049e367 in ifilter_send_frame (frame=0x2041bc0, ifilter=0x20301c0) at fftools/ffmpeg.c:2189
#10 send_frame_to_filters (ist=ist@entry=0x203ea80, decoded_frame=decoded_frame@entry=0x2041bc0) at fftools/ffmpeg.c:2268
#11 0x000000000049e754 in decode_audio (ist=ist@entry=0x203ea80, pkt=0x7fffffffd370, got_output=got_output@entry=0x7fffffffd2e8,
    decode_failed=decode_failed@entry=0x7fffffffd2ec) at fftools/ffmpeg.c:2337
#12 0x00000000004a0e7d in process_input_packet (ist=0x203ea80, pkt=0x7fffffffd7e0, no_eof=0) at fftools/ffmpeg.c:2619
#13 0x000000000047ef57 in process_input (file_index=<optimized out>) at fftools/ffmpeg.c:4462
#14 transcode_step () at fftools/ffmpeg.c:4582
#15 transcode () at fftools/ffmpeg.c:4636
#16 main (argc=<optimized out>, argv=<optimized out>) at fftools/ffmpeg.c:4839
(gdb) print buffer_size
$1 = 0

comment:2 by Elon Musk, 6 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.