mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed bug where video didn't work anymore.
Some other cleanups.
This commit is contained in:
parent
8deb032b2d
commit
e254c4fe3e
|
@ -372,11 +372,6 @@ static int toxav_send_rtp_payload(ToxAv *av,
|
||||||
const uint8_t *payload,
|
const uint8_t *payload,
|
||||||
unsigned int length)
|
unsigned int length)
|
||||||
{
|
{
|
||||||
if (length > MAX_CRYPTO_DATA_SIZE) {
|
|
||||||
LOGGER_WARNING("Size exceeds limit: %d", length);
|
|
||||||
return av_ErrorUnknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (call->crtps[type - av_TypeAudio]) {
|
if (call->crtps[type - av_TypeAudio]) {
|
||||||
|
|
||||||
/* Audio */
|
/* Audio */
|
||||||
|
|
|
@ -170,12 +170,16 @@ int create_recursive_mutex(pthread_mutex_t *mutex)
|
||||||
if (pthread_mutexattr_init(&attr) != 0)
|
if (pthread_mutexattr_init(&attr) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0)
|
if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0) {
|
||||||
|
pthread_mutexattr_destroy(&attr);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create queue mutex */
|
/* Create queue mutex */
|
||||||
if (pthread_mutex_init(mutex, &attr) != 0)
|
if (pthread_mutex_init(mutex, &attr) != 0) {
|
||||||
|
pthread_mutexattr_destroy(&attr);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
pthread_mutexattr_destroy(&attr);
|
pthread_mutexattr_destroy(&attr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user