Merge commit '3105cc20ef3173b87fdc1688962ed6318a1fd039'
This commit is contained in:
12
external/toxcore/c-toxcore/toxav/toxav.c
vendored
12
external/toxcore/c-toxcore/toxav/toxav.c
vendored
@ -13,6 +13,7 @@
|
||||
#include "rtp.h"
|
||||
#include "toxav_hacks.h"
|
||||
|
||||
#include "../toxcore/Messenger.h"
|
||||
#include "../toxcore/ccompat.h"
|
||||
#include "../toxcore/logger.h"
|
||||
#include "../toxcore/mono_time.h"
|
||||
@ -87,6 +88,7 @@ typedef struct DecodeTimeStats {
|
||||
} DecodeTimeStats;
|
||||
|
||||
struct ToxAV {
|
||||
const Memory *mem;
|
||||
Logger *log;
|
||||
Tox *tox;
|
||||
MSISession *msi;
|
||||
@ -219,6 +221,7 @@ ToxAV *toxav_new(Tox *tox, Toxav_Err_New *error)
|
||||
goto RETURN;
|
||||
}
|
||||
|
||||
av->mem = tox->sys.mem;
|
||||
av->log = tox->m->log;
|
||||
av->tox = tox;
|
||||
av->msi = msi_new(av->log, av->tox);
|
||||
@ -994,9 +997,8 @@ static Toxav_Err_Send_Frame send_frames(const ToxAV *av, ToxAVCall *call)
|
||||
is_keyframe);
|
||||
|
||||
if (res < 0) {
|
||||
char *netstrerror = net_new_strerror(net_error());
|
||||
LOGGER_WARNING(av->log, "Could not send video frame: %s", netstrerror);
|
||||
net_kill_strerror(netstrerror);
|
||||
Net_Strerror error_str;
|
||||
LOGGER_WARNING(av->log, "Could not send video frame: %s", net_strerror(net_error(), &error_str));
|
||||
return TOXAV_ERR_SEND_FRAME_RTP_FAILED;
|
||||
}
|
||||
}
|
||||
@ -1507,7 +1509,7 @@ static bool call_prepare_transmission(ToxAVCall *call)
|
||||
goto FAILURE;
|
||||
}
|
||||
|
||||
call->audio_rtp = rtp_new(av->log, RTP_TYPE_AUDIO, av->tox, av, call->friend_number, call->bwc,
|
||||
call->audio_rtp = rtp_new(av->log, av->mem, RTP_TYPE_AUDIO, av->tox, av, call->friend_number, call->bwc,
|
||||
call->audio, ac_queue_message);
|
||||
|
||||
if (call->audio_rtp == nullptr) {
|
||||
@ -1523,7 +1525,7 @@ static bool call_prepare_transmission(ToxAVCall *call)
|
||||
goto FAILURE;
|
||||
}
|
||||
|
||||
call->video_rtp = rtp_new(av->log, RTP_TYPE_VIDEO, av->tox, av, call->friend_number, call->bwc,
|
||||
call->video_rtp = rtp_new(av->log, av->mem, RTP_TYPE_VIDEO, av->tox, av, call->friend_number, call->bwc,
|
||||
call->video, vc_queue_message);
|
||||
|
||||
if (call->video_rtp == nullptr) {
|
||||
|
Reference in New Issue
Block a user