Skip to content

Commit

Permalink
Don't call incref / decref directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 18, 2023
1 parent 1a5ae31 commit 4d4cd44
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/commands/rpcpv1_norecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ handle_stop_record(const struct rtpp_cfg *cfsp, struct rtpp_session *spa, int id
assert(spa->rtcp->stream[idx]->rrc != NULL);
RTPP_LOG(spa->log, RTPP_LOG_INFO,
"stopping recording RTCP session on port %d", spa->rtcp->stream[idx]->port);
CALL_SMETHOD(spa->rtcp->stream[idx]->rrc->rcnt, decref);
RTPP_OBJ_DECREF(spa->rtcp->stream[idx]->rrc);
spa->rtcp->stream[idx]->rrc = NULL;
}
RTPP_LOG(spa->log, RTPP_LOG_INFO,
"stopping recording RTP session on port %d", spa->rtp->stream[idx]->port);
CALL_SMETHOD(spa->rtp->stream[idx]->rrc->rcnt, decref);
RTPP_OBJ_DECREF(spa->rtp->stream[idx]->rrc);
spa->rtp->stream[idx]->rrc = NULL;
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/rtpp_memdeb.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ rtpp_memdeb_dtor(void *p)

CHK_PRIV(pvt, p);
if (pvt->_md_glog != NULL) {
CALL_SMETHOD(pvt->_md_glog->rcnt, decref);
RTPP_OBJ_DECREF(pvt->_md_glog);
}
pvt->magic = MEMDEB_SIGNATURE_FREE(pvt);
pthread_mutex_destroy(&pvt->mutex);
Expand All @@ -177,7 +177,7 @@ rtpp_memdeb_setlog(void *p, struct rtpp_log *log)
struct rtpp_memdeb_priv *pvt;

CHK_PRIV(pvt, p);
CALL_SMETHOD(log->rcnt, incref);
RTPP_OBJ_INCREF(log);
pvt->_md_glog = log;
}

Expand Down
2 changes: 1 addition & 1 deletion src/rtpp_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ rtpp_stream_dtor(struct rtpp_stream_priv *pvt)
struct rtpp_refcnt *mdata_rcnt;
mdata_rcnt = atomic_load(&(pvt->pmod_data.adp[i]));
if (mdata_rcnt != NULL) {
CALL_SMETHOD(mdata_rcnt, decref);
RC_DECREF(mdata_rcnt);
}
}
if (pub->ttl != NULL)
Expand Down

0 comments on commit 4d4cd44

Please sign in to comment.