mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 22:28:07 +00:00
Fix crash in quality reporting when call with audio, video and text + fix future index out of bound issue (if main stream index > 3)
This commit is contained in:
parent
61061fa307
commit
f574e10a87
3 changed files with 8 additions and 5 deletions
|
|
@ -281,6 +281,7 @@ static void _linphone_call_log_destroy(LinphoneCallLog *cl) {
|
|||
if (cl->call_id) ms_free(cl->call_id);
|
||||
if (cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]);
|
||||
if (cl->reporting.reports[LINPHONE_CALL_STATS_VIDEO]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_VIDEO]);
|
||||
if (cl->reporting.reports[LINPHONE_CALL_STATS_TEXT]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_TEXT]);
|
||||
}
|
||||
|
||||
LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *from, LinphoneAddress *to) {
|
||||
|
|
@ -296,6 +297,7 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCallDir dir, LinphoneAddress *fr
|
|||
|
||||
cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]=linphone_reporting_new();
|
||||
cl->reporting.reports[LINPHONE_CALL_STATS_VIDEO]=linphone_reporting_new();
|
||||
cl->reporting.reports[LINPHONE_CALL_STATS_TEXT]=linphone_reporting_new();
|
||||
cl->connected_date_time=0;
|
||||
return cl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4262,15 +4262,16 @@ void linphone_call_stats_uninit(LinphoneCallStats *stats){
|
|||
}
|
||||
|
||||
void linphone_call_notify_stats_updated(LinphoneCall *call, int stream_index){
|
||||
LinphoneCallStats *stats=&call->stats[stream_index];
|
||||
LinphoneCore *lc=call->core;
|
||||
LinphoneCallStats *stats = &call->stats[stream_index];
|
||||
LinphoneCore *lc = call->core;
|
||||
if (stats->updated){
|
||||
switch(stats->updated) {
|
||||
case LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE:
|
||||
case LINPHONE_CALL_STATS_SENT_RTCP_UPDATE:
|
||||
linphone_reporting_on_rtcp_update(call, stream_index);
|
||||
linphone_reporting_on_rtcp_update(call, stream_index == call->main_audio_stream_index ? SalAudio : stream_index == call->main_video_stream_index ? SalVideo : SalText);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
linphone_core_notify_call_stats_updated(lc, call, stats);
|
||||
stats->updated = 0;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ BELLE_SIP_DECLARE_VPTR(LinphoneCallParams);
|
|||
|
||||
|
||||
struct _LinphoneQualityReporting{
|
||||
reporting_session_report_t * reports[2]; /**Store information on audio and video media streams (RFC 6035) */
|
||||
reporting_session_report_t * reports[3]; /**Store information on audio and video media streams (RFC 6035) */
|
||||
bool_t was_video_running; /*Keep video state since last check in order to detect its (de)activation*/
|
||||
LinphoneQualityReportingReportSendCb on_report_sent;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue