Fix crash in quality reporting.

This commit is contained in:
Ghislain MARY 2018-01-03 10:59:55 +01:00
parent 50244176a6
commit c050b2449a
3 changed files with 8 additions and 3 deletions

View file

@ -612,11 +612,11 @@ void linphone_reporting_on_rtcp_update(LinphoneCall *call, SalStreamType stats_t
int report_interval;
if (stats_type == 0) {
stats = L_GET_CPP_PTR_FROM_C_OBJECT(call)->getStats(LinphoneStreamTypeAudio);
stats = L_GET_PRIVATE_FROM_C_OBJECT(call)->getStats(LinphoneStreamTypeAudio);
} else if (stats_type == 1) {
stats = L_GET_CPP_PTR_FROM_C_OBJECT(call)->getStats(LinphoneStreamTypeVideo);
stats = L_GET_PRIVATE_FROM_C_OBJECT(call)->getStats(LinphoneStreamTypeVideo);
} else {
stats = L_GET_CPP_PTR_FROM_C_OBJECT(call)->getStats(LinphoneStreamTypeText);
stats = L_GET_PRIVATE_FROM_C_OBJECT(call)->getStats(LinphoneStreamTypeText);
}
if (! media_report_enabled(call,stats_type))

View file

@ -59,6 +59,7 @@ public:
bool getRingingBeep () const { return ringingBeep; }
void setAudioMuted (bool value);
void setRingingBeep (bool value) { ringingBeep = value; }
LinphoneCallStats *getStats (LinphoneStreamType type) const;
void createPlayer () const;

View file

@ -61,6 +61,10 @@ void CallPrivate::setAudioMuted (bool value) {
static_pointer_cast<MediaSession>(getActiveSession())->getPrivate()->setAudioMuted(value);
}
LinphoneCallStats *CallPrivate::getStats (LinphoneStreamType type) const {
return static_pointer_cast<const MediaSession>(getActiveSession())->getPrivate()->getStats(type);
}
// -----------------------------------------------------------------------------
void CallPrivate::initiateIncoming () {