mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 06:34:19 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@871 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
bef74390f5
commit
cefb356398
5 files changed
+65
-23
No files matched your search
@@ -59,7 +59,7 @@ static switch_status switch_raw_encode(switch_codec *codec,
|
||||
{
|
||||
|
||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */
|
||||
if (codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
memcpy(encoded_data, decoded_data, decoded_data_len);
|
||||
*encoded_data_len = decoded_data_len;
|
||||
return SWITCH_STATUS_RESAMPLE;
|
||||
@@ -75,7 +75,7 @@ static switch_status switch_raw_decode(switch_codec *codec,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
if (codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
memcpy(decoded_data, encoded_data, encoded_data_len);
|
||||
*decoded_data_len = encoded_data_len;
|
||||
return SWITCH_STATUS_RESAMPLE;
|
||||
|
||||
Reference in new issue
Block a user