Don't copy the time stampes over when the sample rates differ

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10341 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-11-12 10:28:16 +00:00
parent 33ca42dc6c
commit ee7008087f
1 changed files with 10 additions and 2 deletions

View File

@ -421,7 +421,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
case SWITCH_STATUS_SUCCESS:
session->enc_read_frame.samples = session->read_codec->implementation->decoded_bytes_per_packet / sizeof(int16_t);
if (perfect) {
session->enc_read_frame.timestamp = read_frame->timestamp;
if (enc_frame->codec->implementation->samples_per_packet != session->read_codec->implementation->samples_per_packet) {
session->enc_read_frame.timestamp = 0;
} else {
session->enc_read_frame.timestamp = read_frame->timestamp;
}
session->enc_read_frame.rate = read_frame->rate;
session->enc_read_frame.ssrc = read_frame->ssrc;
session->enc_read_frame.seq = read_frame->seq;
@ -793,7 +797,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
case SWITCH_STATUS_SUCCESS:
session->enc_write_frame.codec = session->write_codec;
session->enc_write_frame.samples = enc_frame->datalen / sizeof(int16_t);
session->enc_write_frame.timestamp = frame->timestamp;
if (frame->codec->implementation->samples_per_packet != session->write_codec->implementation->samples_per_packet) {
session->enc_write_frame.timestamp = 0;
} else {
session->enc_write_frame.timestamp = frame->timestamp;
}
session->enc_write_frame.payload = session->write_codec->implementation->ianacode;
session->enc_write_frame.m = frame->m;
session->enc_write_frame.ssrc = frame->ssrc;