diff options
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/toxav.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index ad8e651f..3085827c 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -422,7 +422,7 @@ inline__ int toxav_send_rtp_payload ( ToxAv *av, int32_t call_index, ToxAvCallTy | |||
422 | /* number of pieces - 1*/ | 422 | /* number of pieces - 1*/ |
423 | uint8_t numparts = (length - 1) / VIDEOFRAME_PIECE_SIZE; | 423 | uint8_t numparts = (length - 1) / VIDEOFRAME_PIECE_SIZE; |
424 | 424 | ||
425 | uint8_t load[3 + VIDEOFRAME_PIECE_SIZE]; | 425 | uint8_t load[2 + VIDEOFRAME_PIECE_SIZE]; |
426 | load[0] = av->calls[call_index].frame_outid++; | 426 | load[0] = av->calls[call_index].frame_outid++; |
427 | load[1] = 0; | 427 | load[1] = 0; |
428 | 428 | ||
@@ -542,11 +542,11 @@ inline__ int toxav_recv_video ( ToxAv *av, int32_t call_index, vpx_image_t **out | |||
542 | call->frame_limit = 0; | 542 | call->frame_limit = 0; |
543 | 543 | ||
544 | if (rc != VPX_CODEC_OK) { | 544 | if (rc != VPX_CODEC_OK) { |
545 | LOGGER_ERROR("Error decoding video: %s\n", vpx_codec_err_to_string(rc)); | 545 | LOGGER_ERROR("Error decoding video: %u %s\n", i, vpx_codec_err_to_string(rc)); |
546 | return ErrorInternal; | ||
547 | } | 546 | } |
548 | } else { | 547 | } else { |
549 | /* old packet, dont read */ | 548 | /* old packet, dont read */ |
549 | LOGGER_DEBUG("Old packet: %u\n", i); | ||
550 | continue; | 550 | continue; |
551 | } | 551 | } |
552 | 552 | ||
@@ -556,12 +556,14 @@ inline__ int toxav_recv_video ( ToxAv *av, int32_t call_index, vpx_image_t **out | |||
556 | continue; | 556 | continue; |
557 | } | 557 | } |
558 | 558 | ||
559 | LOGGER_DEBUG("Video Packet: %u %u\n", packet[0], packet[1]); | ||
559 | memcpy(call->frame_buf + packet[1] * VIDEOFRAME_PIECE_SIZE, packet + VIDEOFRAME_HEADER_SIZE, | 560 | memcpy(call->frame_buf + packet[1] * VIDEOFRAME_PIECE_SIZE, packet + VIDEOFRAME_HEADER_SIZE, |
560 | recved_size - VIDEOFRAME_HEADER_SIZE); | 561 | recved_size - VIDEOFRAME_HEADER_SIZE); |
561 | uint32_t limit = packet[1] * VIDEOFRAME_PIECE_SIZE + recved_size - VIDEOFRAME_HEADER_SIZE; | 562 | uint32_t limit = packet[1] * VIDEOFRAME_PIECE_SIZE + recved_size - VIDEOFRAME_HEADER_SIZE; |
562 | 563 | ||
563 | if (limit > call->frame_limit) { | 564 | if (limit > call->frame_limit) { |
564 | call->frame_limit = limit; | 565 | call->frame_limit = limit; |
566 | LOGGER_DEBUG("Limit: %u\n", call->frame_limit); | ||
565 | } | 567 | } |
566 | } | 568 | } |
567 | 569 | ||