I noticed occasional segfaults after revision 1030. It looks like calling frame_reset(fr) in frame.c:70 can lead to problems.
The attached patch seems to fix it.
Logged In: NO
You're right. But even instead of making frame_buffers_reset more careful, one should prevent it from being called before any buffers have been allocated!
Interesting that this didn't blow before.
What OS / C library are you using?
Anyhow, please have a look at svn >= 1083, where I also fixed some uninitialized variables, even.
I had valgrind running over current svn and it looks quite happy; a good deal of warnings concerning possible memory leaks and errors is triggered by ALSA and dlopen stuff, though.
Logged In: YES
Erm, that last comment was from me...
Logged In: YES
> Interesting that this didn't blow before.
> What OS / C library are you using?
Nothing special: Debian testing/unstable, libc6 2.6.1.
However, I've been prepping the lastfm package so once libmpg123
gets in the archive it can use that instead of the much older source
that upstream bundles. I guess streaming music for a couple of hours
gives the library a bit of a shakedown. :)
Another thing I noticed... Last.fm delivers songs as individual
streams which are always encoded 44100 stereo signed 16. Frequently,
though, mpg123_getformat reports odd formats like:
22050 stereo signed 16
11025 stereo signed 16
44100 stereo unsigned 8
44100 stereo ulaw 8
Restricting output to only one format prevents that. Any thoughts on
why it might misinterpret format? I could open a separate bug report
if you think it might be a problem in the library.
> Anyhow, please have a look at svn >= 1083, where I also fixed some
> uninitialized variables, even.
> I had valgrind running over current svn and it looks quite happy; a
> good deal of warnings concerning possible memory leaks and errors
> is triggered by ALSA and dlopen stuff, though.
It behaves so far. I'll let you know if it blows up again.
That's a good message about lastfm - I really appreciate real world test cases, especially in this early stage of libmpg123's life!
I indeed think that this format issue deserves it's own bug item.
Can you give me an example stream and program (the order of libmpg123 API calls...) that produces the spurious formats?
I don't have any streams to send, since the lastfm client doesn't save those. But I'll send you a link to the package. Then you can produce as many spurious formats as you like.
Log in to post a comment.