[pjsip] Maybe a bug with Wav_player destruction, with non 8 kHz files ?
electrocut at gmail.com
Sat Apr 12 07:05:21 EDT 2008
Thanks for having taken this problem into account so fast !
I'll check that everything is ok now.
Nanang Izzuddin wrote:
> Hi Tanguy Floc'h,
> This is a bug and has been added to ticket #526:
> Thanks for a such detail report!
> On 11/04/2008, Tanguy Floc'h <electrocut at gmail.com> wrote:
>> Hi !
>> First, thank you for your great work, very well documented.
>> I have a problem with wav_player.c, when trying to destroy the player from
>> eof-callback function, with non-8kHz wav files (I read that it should be ok
>> to do this, if I return a non-Zero value at the end of the callback)
>> With 8 kHz - 16 bit - Mono files, everything is OK.
>> This is the bug description :
>> - From the callback method, after destroying my player with
>> (pjsua_player_destroy(wavId);), I return a non-zero result (-1), so that the
>> receiving function knows that the player has been destroyed.
>> - I come back to fill_buffer(), in
>> pjmedia\src\pjmedia\wav_player.c (line 142)
>> Which return the same status (-1)
>> - I come back to file_get_frame(), in
>> pjmedia\src\pjmedia\wav_player.c (line 562)
>> As "endvalue = 120" in my case,
>> the test "return(endread? PJ_SUCCESS : status)" return PJ_SUCCESS
>> (I saw that for 8 kHz files, the call to fill_buffer was not the same, and I
>> go back to line 544 in file_get_frame(), instead of line 562).
>> - I come back to pjmedia_port_get_frame(), in pjmedia\src\pjmedia\port.c
>> (line 67)
>> Which return the same status : PJ_SUCCESS
>> - Then I come back to read_port(), in
>> pjmedia\src\pjmedia\conference.c (line 1357)
>> Line 1374, the function try to read the "cport->channel_count" value, which
>> is wrong (=4277075694), because the player has been distroyed.
>> At line 1383, because the value "cport->channel_count" is !=1, the function
>> try to call pjmedia_convert_channel_nto1()
>> That is in that function that the crash occurs.
>> Sorry if the problem isn't perfectly described, I'm still not very aware of
>> How Pjmedia works in details.
>> Have you any idea about how to fix this problem ?
>> Visit our blog: http://blog.pjsip.org
>> pjsip mailing list
>> pjsip at lists.pjsip.org
> Visit our blog: http://blog.pjsip.org
> pjsip mailing list
> pjsip at lists.pjsip.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pjsip