diff options
author | mannol <eniz_vukovic@hotmail.com> | 2015-03-22 23:50:43 +0100 |
---|---|---|
committer | mannol <eniz_vukovic@hotmail.com> | 2015-03-22 23:50:43 +0100 |
commit | 62af82705a805648a4dba54a7f516681e5163923 (patch) | |
tree | f417e3489ed834de9df60cb7b4bbec625482638c /toxav/rtp.c | |
parent | a4fae8ffd49e298cd87e13be2496faf77e492bd9 (diff) |
Some progress
Diffstat (limited to 'toxav/rtp.c')
-rw-r--r-- | toxav/rtp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c index 8319c7dc..e5f45310 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -363,7 +363,6 @@ int rtp_handle_packet ( Messenger *m, int32_t friendnumber, const uint8_t *data, | |||
363 | } | 363 | } |
364 | 364 | ||
365 | queue_message(session, msg); | 365 | queue_message(session, msg); |
366 | |||
367 | return 0; | 366 | return 0; |
368 | } | 367 | } |
369 | 368 | ||
@@ -427,8 +426,6 @@ RTPSession *rtp_new ( int payload_type, Messenger *messenger, int friend_num ) | |||
427 | return NULL; | 426 | return NULL; |
428 | } | 427 | } |
429 | 428 | ||
430 | LOGGER_DEBUG("Registered packet handler: pt: %d; fid: %d", payload_type, friend_num); | ||
431 | |||
432 | retu->version = RTP_VERSION; /* It's always 2 */ | 429 | retu->version = RTP_VERSION; /* It's always 2 */ |
433 | retu->padding = 0; /* If some additional data is needed about the packet */ | 430 | retu->padding = 0; /* If some additional data is needed about the packet */ |
434 | retu->extension = 0; /* If extension to header is needed */ | 431 | retu->extension = 0; /* If extension to header is needed */ |
@@ -467,7 +464,7 @@ void rtp_kill ( RTPSession *session ) | |||
467 | { | 464 | { |
468 | if ( !session ) return; | 465 | if ( !session ) return; |
469 | 466 | ||
470 | custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix, NULL, NULL); | 467 | rtp_stop_receiving (session); |
471 | 468 | ||
472 | free ( session->ext_header ); | 469 | free ( session->ext_header ); |
473 | free ( session->csrc ); | 470 | free ( session->csrc ); |
@@ -483,6 +480,7 @@ int rtp_start_receiving(RTPSession* session) | |||
483 | if (session == NULL) | 480 | if (session == NULL) |
484 | return 0; | 481 | return 0; |
485 | 482 | ||
483 | LOGGER_DEBUG("Registering packet handler: pt: %d; friend: %d", session->prefix, session->dest); | ||
486 | return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix, | 484 | return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix, |
487 | rtp_handle_packet, session); | 485 | rtp_handle_packet, session); |
488 | } | 486 | } |
@@ -492,6 +490,7 @@ int rtp_stop_receiving(RTPSession* session) | |||
492 | if (session == NULL) | 490 | if (session == NULL) |
493 | return 0; | 491 | return 0; |
494 | 492 | ||
493 | LOGGER_DEBUG("Unregistering packet handler: pt: %d; friend: %d", session->prefix, session->dest); | ||
495 | return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix, | 494 | return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix, |
496 | NULL, NULL); | 495 | NULL, NULL); |
497 | } | 496 | } |