Skip to main content

Topic: linking dynamic libarary ( - Segmentation Fault at lame_ (Read 1519 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • bbsforu
  • [*]
linking dynamic libarary ( - 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 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.
  • Last Edit: 17 January, 2012, 02:21:34 AM by bbsforu