mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-19 09:47:23 +00:00
fix video read frame function to behave like the audio one when waiting for codecs
This commit is contained in:
parent
5db3a9b071
commit
12c680d38f
@ -816,6 +816,7 @@ static switch_status_t sofia_read_video_frame(switch_core_session_t *session, sw
|
|||||||
{
|
{
|
||||||
private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
|
private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
|
||||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||||
|
uint32_t sanity = 1000;
|
||||||
|
|
||||||
switch_assert(tech_pvt != NULL);
|
switch_assert(tech_pvt != NULL);
|
||||||
|
|
||||||
@ -823,10 +824,13 @@ static switch_status_t sofia_read_video_frame(switch_core_session_t *session, sw
|
|||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session))) {
|
while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session) && !switch_channel_test_flag(channel, CF_REQ_MEDIA))) {
|
||||||
if (switch_channel_ready(channel)) {
|
switch_ivr_parse_all_messages(tech_pvt->session);
|
||||||
|
|
||||||
|
if (--sanity && switch_channel_ready(channel)) {
|
||||||
switch_yield(10000);
|
switch_yield(10000);
|
||||||
} else {
|
} else {
|
||||||
|
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_RECOVERY_ON_TIMER_EXPIRE);
|
||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user