📄 hust_rtpreleasestream.c
字号:
/*------------------------------------------------------------------------- * rtpreleasestream.c - rtpreleasestream *------------------------------------------------------------------------- */#include "ipOS.h"#include "ipHAL.h"#include "hust_rtp.h"#include "hust_rtcp.h"#include "hust_hash.h"/*------------------------------------------------------------------------ * rtpreleasestream - decrement a streams refcnt and remove if necessary *------------------------------------------------------------------------ */intrtpreleasestream(struct session *psn, struct stream *pstm){ ///if (pthread_mutex_lock(&psn->sn_getstreammutex) != 0) ///return ERROR; pstm->stm_refcnt--; if (pstm->stm_refcnt == 0 && pstm->stm_zombie == TRUE) { /* * Remove this stream from the Cname->SSRC mapping. */ rtcpcnamerem(psn, pstm); if (pstm->stm_name != NULL) heap_free(pstm->stm_name); if (pstm->stm_email != NULL) heap_free(pstm->stm_email); if (pstm->stm_phone != NULL) heap_free(pstm->stm_phone); if (pstm->stm_loc != NULL) heap_free(pstm->stm_loc); if (pstm->stm_tool != NULL) heap_free(pstm->stm_tool); if (pstm->stm_note != NULL) heap_free(pstm->stm_note); if (pstm->stm_priv != NULL) heap_free(pstm->stm_priv); /* * Remove this stream from the SSRC->struct stream * * hashtable. The htdel function will invoke * rtpdestroystream. */ htdel(psn->sn_ssrcs, pstm->stm_ssrc); } ////pthread_mutex_unlock(&psn->sn_getstreammutex); return ;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -