Maybe a bug with Wav_player destruction, with non 8 kHz files ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tanguy Floc'h,

This is a bug and has been added to ticket #526:
http://trac.pjsip.org/repos/ticket/526

Thanks for a such detail report!

Regards,
nanang


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 ?
>
> Regards,
>
> Electrocut
>
> _______________________________________________
>  Visit our blog: http://blog.pjsip.org
>
>  pjsip mailing list
>  pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux