[ lame-Support Requests-3474730 ] Segmentation Fault at the end of lame_copy_inbuffer()
SourceForge.net <[email protected]>
| Newsgroups | gmane.comp.audio.mp3.lame |
|---|---|
| Message-ID | <[email protected]> |
Support Requests item #3474730, was opened at 2012-01-16 22:54
Message generated for change (Comment added) made by robert
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=200290&aid=3474730&group_id=290
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: boram yoon (andrewyoon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Segmentation Fault at the end of lame_copy_inbuffer()
Initial Comment:
Hi, my name is Andrew.
I'm making frontend program on linux using libmp3lame.so for practice before porting to Android.
I composed a single main function which is dong 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
And strange thing is that the segmentation fault always arise at the second call.
I printed with printf every buffer's data, but the flow ends with Segmentation Fault when it prints aroud
the end of arrays(or buffer). OTL...
Please give me if you have tips about this problem. please. I'm doing this for three days..
----------------------------------------------------------------------
>Comment By: Robert Hegemann (robert)
Date: 2012-01-18 00:12
Message:
When these function pointers weren't set, then make sure you didn't forget
to call lame_init_params before doing the actual encoding.
----------------------------------------------------------------------
Comment By: boram yoon (andrewyoon)
Date: 2012-01-17 18:28
Message:
just calling default function(CBR_iteration_loop, fht, init_xrpow_core_c)
instead of referencing gfc and not changing
there inner codes.
----------------------------------------------------------------------
Comment By: boram yoon (andrewyoon)
Date: 2012-01-17 18:08
Message:
thank you. I did more works. : )
I traced and changed library codes.
I think there was problems in calling function pointer.
gfc->iteration_loop() (encoder.c)
gfc->fft_fht() (fft.c)
gfc->init_xrpow_core() (quantize.c)
they are function pointer, and there initialization was not completed i
think.
I have a question. I'm trying to convert raw PCM wave file to mp3
files(320, 128, 192..)
Are there any problems fixing these functions above to encode simply?
I changed the codes not to reference gfc flags,
and just used local or default functions.
( CBR_iteration_loot(), fht(), init_xrpow_core_c() )
----------------------------------------------------------------------
Comment By: Robert Hegemann (robert)
Date: 2012-01-17 01:51
Message:
>From the little information at hand, it sounds like you are counting the
number of input samples wrong.
----------------------------------------------------------------------
Comment By: boram yoon (andrewyoon)
Date: 2012-01-16 22:58
Message:
I'm sorry. i just know here is not for support question board.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=200290&aid=3474730&group_id=290
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d