Matthieu Regnauld
2018-Nov-05 19:46 UTC
[Vorbis-dev] Decode ogg file while downloading: what are the good practices?
Hello, After more tests, I discovered a new problem in my code ( https://gist.github.com/mregnauld/3f7cdc43b02ec3bbd91641b9333ba072) while seeking in an audio file that is being downloaded. When I seek in random positions (when I call OggPlayer::seek()), while I extract audio samples (when I call OggPlayer::extract() every 5ms, in my test - basically, I just play the audio file), sometimes, I get random errors with ov_read(): - sometimes it returns 0 (end of file) - sometimes it returns an error (like an OV_HOLE error) - sometimes it just crashes And that, even if I seek to a position which is at least 44100 frames (1 second) before the end of the file... Has anyone had this problem? Is there maybe any buffer somewhere that I forget to flush, or something? Thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/vorbis-dev/attachments/20181105/69e10898/attachment.html>
Gunter Königsmann
2018-Nov-05 19:51 UTC
[Vorbis-dev] Decode ogg file while downloading: what are the good practices?
Can you get a backtrace that tells in which line of the code of the library it crashes? Not that you did Fuzzing using incomplete files and found a bug. Am 5. November 2018 20:46:21 MEZ schrieb Matthieu Regnauld <mregnauld at gmail.com>:>Hello, > >After more tests, I discovered a new problem in my code ( >https://gist.github.com/mregnauld/3f7cdc43b02ec3bbd91641b9333ba072) >while >seeking in an audio file that is being downloaded. > >When I seek in random positions (when I call OggPlayer::seek()), while >I >extract audio samples (when I call OggPlayer::extract() every 5ms, in >my >test - basically, I just play the audio file), sometimes, I get random >errors with ov_read(): >- sometimes it returns 0 (end of file) >- sometimes it returns an error (like an OV_HOLE error) >- sometimes it just crashes > >And that, even if I seek to a position which is at least 44100 frames >(1 >second) before the end of the file... > >Has anyone had this problem? Is there maybe any buffer somewhere that I >forget to flush, or something? > >Thanks for your help.-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/vorbis-dev/attachments/20181105/27b41041/attachment.html>
Matthieu Regnauld
2018-Nov-05 20:17 UTC
[Vorbis-dev] Decode ogg file while downloading: what are the good practices?
I haven't managed yet to get any stacktrace, but I'll work on it (that's the problem using C/C++ code in an Android app...). Also, it's important to notice that I manage to make ov_read() crash, *even when the audio file is fully downloaded!* What I do to reproduce the bug is to call ov_pcm_seek() (without any reload of the file) many times in a row, very quickly (like 6-7 times per seconds, during a few seconds). So far, any idea how to fix that? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/vorbis-dev/attachments/20181105/2f9f474f/attachment.html>
Possibly Parallel Threads
- Decode ogg file while downloading: what are the good practices?
- Decode ogg file while downloading: what are the good practices?
- Decode ogg file while downloading: what are the good practices?
- Decode ogg file while downloading: what are the good practices?
- Decode ogg file while downloading: what are the good practices?