flush queued frames on audio sync event

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13018 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-04-14 17:29:38 +00:00
parent 300bb301b7
commit 84e8dec72f
1 changed files with 19 additions and 0 deletions

View File

@ -688,6 +688,25 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
default:
break;
}
switch (msg->message_id) {
case SWITCH_MESSAGE_INDICATE_BRIDGE:
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
{
void *pop;
while (switch_queue_trypop(tech_pvt->frame_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
switch_frame_t *frame = (switch_frame_t *) pop;
switch_frame_free(&frame);
}
}
break;
default:
break;
}
return SWITCH_STATUS_SUCCESS;
}