-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial segfault when writing OGG VORBIS that is too long #233
Comments
I can confirm the same problem when trying to save ogg files with audios with 2**21 or more samples. |
A problem does still exist on linux at least.
|
We confirm the same issues with
For audios longer than 100 - 120 seconds Falling back to sox to convert longer audios for now (we usually cut audio first, but this time we decided to compress first) |
As far as I know, this is a bug in libsndfile and/or vorbis/opus, and there is nothing we can do within soundfile to fix it. |
I have found that writing OGG VORBIS files where data is of dtype
float32
and the sample rate is 22050, will succeed when writing data arrays of length1048576
(2^20), but will segfault if the array is of length2097152
(2^21). Using faulthandler, Python 3.6, and pysoundfile v0.10.2, the traceback is below:From the above, using pdb, I inserted a break right before the segfault, and found that the
func
being called is the libsndfile functionsf_writef_float <cdata 'int64_t(*)(struct SNDFILE_tag *, void *, int64_t)' 0x7fcc369a9830>
What is weirder is that if I first call the write function with a working value for
frames
(ie 1048576), and then call it with a segfaulting value, such as57889754
, it will correctly save the value that would have otherwise segfaulted. See the following.This second save seems to actually work. I am not sure if I really understand what is going on here. Let me know if you need any more information.
The text was updated successfully, but these errors were encountered: