Discussion:
[pjsip] Bug in pjmedia_wav_playlist_create() function
Алексей Харлов
2014-10-27 10:28:35 UTC
Permalink
Hello!

I use pjsua2 interface to PJSIP.
I just found bug in pjmedia_wav_playlist_create() function.

When I use AudioMediaPlayer's createPlaylist() function, it throws
pj::Error with text "Unsupported WAVE file format (PJMEDIA_EWAVEUNSUPP)".
I found that I can playback the same wav files with AudioMediaPlayer's
createPlayer() function, one by one.

The error occurs in wav_playlist.c on line 455:
if (wavehdr.data_hdr.len != fport->fsize_list[index] -
fport->start_data_list[index])

I had compare pjsua_player_create() and pjsua_playlist_create() functions,
and found that pjsua_player_create() function has other comparison: with
'>' sign.

So, I fixed this expression and playlists works to me now.
You can see diff on this link:
https://github.com/halex2005/pjproject/commit/6cd30232e1ba6dff74651af2f41501dadb06ff77

Best regards, Aleksei

Loading...