diff options
-rw-r--r-- | toxav/toxav.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 47a94fba..c9e11e52 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -841,7 +841,11 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg) | |||
841 | queue(call->j_buf, _msg); | 841 | queue(call->j_buf, _msg); |
842 | 842 | ||
843 | int success = 0, dec_size; | 843 | int success = 0, dec_size; |
844 | int frame_size = 960; | 844 | |
845 | ToxAvCSettings csettings; | ||
846 | toxav_get_peer_csettings(av, call_index, 0, &csettings); | ||
847 | |||
848 | int frame_size = 10000; /* FIXME: not static? */ | ||
845 | int16_t dest[frame_size]; | 849 | int16_t dest[frame_size]; |
846 | 850 | ||
847 | while ((_msg = dequeue(call->j_buf, &success)) || success == 2) { | 851 | while ((_msg = dequeue(call->j_buf, &success)) || success == 2) { |
@@ -858,10 +862,11 @@ void toxav_handle_packet(RTPSession *_session, RTPMessage *_msg) | |||
858 | } | 862 | } |
859 | 863 | ||
860 | if ( av->audio_callback ) | 864 | if ( av->audio_callback ) |
861 | av->audio_callback(av, call_index, dest, frame_size); | 865 | av->audio_callback(av, call_index, dest, dec_size); |
862 | else | 866 | else |
863 | LOGGER_WARNING("Audio packet dropped due to missing callback!"); | 867 | LOGGER_WARNING("Audio packet dropped due to missing callback!"); |
864 | } | 868 | } |
869 | |||
865 | } else { | 870 | } else { |
866 | uint8_t *packet = _msg->data; | 871 | uint8_t *packet = _msg->data; |
867 | int recved_size = _msg->length; | 872 | int recved_size = _msg->length; |