summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-07-03 17:08:38 +0200
committermannol <eniz_vukovic@hotmail.com>2014-07-03 17:08:38 +0200
commitf8a2a865dc32bfa626cc150a509d30d897e1181b (patch)
tree5bb6b234149cdf2a79422815dc59a0c53cb3cb0e /toxav/toxav.c
parenta9a7f6a5952d0385904ec9df078ac065a3f5887f (diff)
parentc4f0650ae33e1669bfc994ef4f76c6c31e4d63c0 (diff)
Resolved conflicts when merging upstream
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index 02c5a970..743d7fcf 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -447,7 +447,7 @@ inline__ int toxav_send_rtp_payload ( ToxAv *av, int32_t call_index, ToxAvCallTy
447 /* number of pieces - 1*/ 447 /* number of pieces - 1*/
448 uint8_t numparts = (length - 1) / VIDEOFRAME_PIECE_SIZE; 448 uint8_t numparts = (length - 1) / VIDEOFRAME_PIECE_SIZE;
449 449
450 uint8_t load[3 + VIDEOFRAME_PIECE_SIZE]; 450 uint8_t load[2 + VIDEOFRAME_PIECE_SIZE];
451 load[0] = av->calls[call_index].frame_outid++; 451 load[0] = av->calls[call_index].frame_outid++;
452 load[1] = 0; 452 load[1] = 0;
453 453
@@ -569,11 +569,11 @@ inline__ int toxav_recv_video ( ToxAv *av, int32_t call_index, vpx_image_t **out
569 call->frame_limit = 0; 569 call->frame_limit = 0;
570 570
571 if (rc != VPX_CODEC_OK) { 571 if (rc != VPX_CODEC_OK) {
572 LOGGER_ERROR("Error decoding video: %s\n", vpx_codec_err_to_string(rc)); 572 LOGGER_ERROR("Error decoding video: %u %s\n", i, vpx_codec_err_to_string(rc));
573 return ErrorInternal;
574 } 573 }
575 } else { 574 } else {
576 /* old packet, dont read */ 575 /* old packet, dont read */
576 LOGGER_DEBUG("Old packet: %u\n", i);
577 continue; 577 continue;
578 } 578 }
579 579
@@ -583,12 +583,14 @@ inline__ int toxav_recv_video ( ToxAv *av, int32_t call_index, vpx_image_t **out
583 continue; 583 continue;
584 } 584 }
585 585
586 LOGGER_DEBUG("Video Packet: %u %u\n", packet[0], packet[1]);
586 memcpy(call->frame_buf + packet[1] * VIDEOFRAME_PIECE_SIZE, packet + VIDEOFRAME_HEADER_SIZE, 587 memcpy(call->frame_buf + packet[1] * VIDEOFRAME_PIECE_SIZE, packet + VIDEOFRAME_HEADER_SIZE,
587 recved_size - VIDEOFRAME_HEADER_SIZE); 588 recved_size - VIDEOFRAME_HEADER_SIZE);
588 uint32_t limit = packet[1] * VIDEOFRAME_PIECE_SIZE + recved_size - VIDEOFRAME_HEADER_SIZE; 589 uint32_t limit = packet[1] * VIDEOFRAME_PIECE_SIZE + recved_size - VIDEOFRAME_HEADER_SIZE;
589 590
590 if (limit > call->frame_limit) { 591 if (limit > call->frame_limit) {
591 call->frame_limit = limit; 592 call->frame_limit = limit;
593 LOGGER_DEBUG("Limit: %u\n", call->frame_limit);
592 } 594 }
593 } 595 }
594 596