mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
fix random issues
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10566 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1264,6 +1264,11 @@ static void do_2833(switch_rtp_t *rtp_session)
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) rtp_flush_read_buffer(switch_rtp_t *rtp_session)
|
||||
{
|
||||
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
|
||||
}
|
||||
|
||||
static void do_flush(switch_rtp_t *rtp_session)
|
||||
{
|
||||
int was_blocking = 0;
|
||||
switch_size_t bytes;
|
||||
@@ -1338,6 +1343,12 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_FLUSH)) {
|
||||
do_flush(rtp_session);
|
||||
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_FLUSH);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rtp_session->max_missed_packets) {
|
||||
if (bytes) {
|
||||
rtp_session->missed_count = 0;
|
||||
|
Reference in New Issue
Block a user