Opened 13 years ago
Closed 13 years ago
#324 closed defect (fixed)
floating point exception while generation of 1s silence
Reported by: | Schweinebacke | Owned by: | Michael Niedermayer |
---|---|---|---|
Priority: | critical | Component: | ffmpeg |
Version: | git-master | Keywords: | fpe regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
ffmpeg -f s16le -i /dev/zero -ab 224000 -ar 48000 -ac 2 -t 1 test.ac3
or
ffmpeg -f s16le -i /dev/zero -ab 224000 -ar 48000 -ac 2 -t 1 test.wav
results in a floating point exception:
ffmpeg version 0.8, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 23 2011 09:35:04 with gcc 4.5.0 20100604 [gcc-4_5-branch revision 160292] configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-postproc --enable-gpl --enable-x11grab --extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-debug --disable-stripping --enable-libgsm --enable-libschroedinger --enable-libdirac --enable-avfilter --enable-libvpx --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libdc1394 --enable-pthreads --enable-librtmp libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Ignoring attempt to set invalid timebase for st:0 [s16le @ 0x635660] Estimating duration from bitrate, this may be inaccurate Input #0, s16le, from '/dev/zero': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0.0: Audio: pcm_s16le, 1 channels, s16 [ac3 @ 0x62f220] channel_layout not specified [ac3 @ 0x62f220] No channel layout specified. The encoder will guess the layout, but it might be incorrect. Output #0, ac3, to 'test.ac3': Metadata: encoder : Lavf53.4.0 Stream #0.0: Audio: ac3, 48000 Hz, stereo, s16, 224 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help floating point exception
Change History (4)
comment:1 by , 13 years ago
Keywords: | fpe regression added; floating point exception removed |
---|---|
Reproduced by developer: | set |
Status: | new → open |
Version: | 0.8 → git-master |
comment:3 by , 13 years ago
Regression since:
commit d7ee44024c96ebdbcd718885a77e9a07779df54c
Author: Anton Khirnov <anton@khirnov.net>
Date: Wed Jun 15 08:00:03 2011 +0200
ffmpeg: don't abuse a global for passing samplerate from input to output
It's broken with multiple files or audio streams.
This removes the default samplerate of 44100 for raw input, hence all
the FATE changes.
comment:4 by , 13 years ago
Analyzed by developer: | set |
---|---|
Resolution: | → fixed |
Status: | open → closed |
Fixed in commit:
commit aa638b4600e1fa7a1b64323b8228c459af644a47 Author: Stefano Sabatini <stefasab@gmail.com> Date: Thu Oct 27 01:38:21 2011 +0200 rawdec: add check on sample_rate Prevent error condition in case sample_rate is unset or set to a negative value. In particular, fix divide-by-zero error occurring in ffmpeg due to sample_rate set to 0 in output_packet(), in code: ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / ist->st->codec->sample_rate; Fix trac ticket #324.
The user is forced to specify a samplerate, the default value of 0 is rejected, and the FPE is thus avoided.
Workaround is to use