Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: linking dynamic libarary (libmp3lame.so) - Segmentation Fault at lame_ (Read 2421 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

linking dynamic libarary (libmp3lame.so) - Segmentation Fault at lame_

Hi. my name is andrew. I have a question about using Lame.
I'm making LAME's frontend program on linux using libmp3lame.so for practice.
I composed a single main function which is doing specific encoding options.(same as default option)
referecing API documents,
The library file is linked dynamically and I'm calling inner functions through invoke functions..
I checked global variables and flags before call lame_encode_buffer_int()

But when i call the lame_encode_buffer_int(), It always stops with segmentation fault at the end of
lame_copy_inbuffer() in lame.c. My source code is almost same as frontend's lame_main.c and main.c.
A strange thing is that the segmentation fault always arise at the lame_encode_buffer_int 's second call.

I printed with every buffer's data with printf, but the flow ends with Segmentation Fault when it prints around
the end of arrays(or buffer). OTL...

Please give me if you have any tips about this problem.