summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index a301e007..aa903ff7 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -37,8 +37,9 @@
37#include <stdlib.h> 37#include <stdlib.h>
38#include <string.h> 38#include <string.h>
39 39
40/* Assume 60 fps*/ 40/* Assume 24 fps*/
41#define MAX_ENCODE_TIME_US ((1000 / 24) * 1000) 41#define MAX_ENCODE_TIME_US ((1000 / 24) * 1000)
42#define MAX_DECODE_TIME_US MAX_ENCODE_TIME_US
42 43
43#define MAX_VIDEOFRAME_SIZE 0x40000 /* 256KiB */ 44#define MAX_VIDEOFRAME_SIZE 0x40000 /* 256KiB */
44#define VIDEOFRAME_PIECE_SIZE 0x500 /* 1.25 KiB*/ 45#define VIDEOFRAME_PIECE_SIZE 0x500 /* 1.25 KiB*/
@@ -794,7 +795,7 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg)
794 /* piece of current frame */ 795 /* piece of current frame */
795 } else if (i > 0 && i < 128) { 796 } else if (i > 0 && i < 128) {
796 /* recieved a piece of a frame ahead, flush current frame and start reading this new frame */ 797 /* recieved a piece of a frame ahead, flush current frame and start reading this new frame */
797 int rc = vpx_codec_decode(&call->cs->v_decoder, call->frame_buf, call->frame_limit, NULL, 0); 798 int rc = vpx_codec_decode(&call->cs->v_decoder, call->frame_buf, call->frame_limit, NULL, MAX_DECODE_TIME_US);
798 call->frame_id = packet[0]; 799 call->frame_id = packet[0];
799 memset(call->frame_buf, 0, call->frame_limit); 800 memset(call->frame_buf, 0, call->frame_limit);
800 call->frame_limit = 0; 801 call->frame_limit = 0;