pthread_cond_signal(&sq->sq_cond);
pthread_mutex_unlock(&sq->sq_mutex);
pthread_mutex_unlock(&satip_rtp_lock);
- pthread_mutex_lock(rtp->tcp_lock);
+ if (rtp->port == RTSP_TCP_DATA)
+ pthread_mutex_lock(rtp->tcp_lock);
pthread_join(rtp->tid, NULL);
- pthread_mutex_unlock(rtp->tcp_lock);
+ if (rtp->port == RTSP_TCP_DATA)
+ pthread_mutex_unlock(rtp->tcp_lock);
udp_multisend_free(&rtp->um);
mpegts_pid_done(&rtp->pids);
while ((tbl = TAILQ_FIRST(&rtp->pmt_tables)) != NULL) {
int findex;
int src;
int state;
- int shutdown_on_close;
+ http_connection_t *shutdown_on_close;
int perm_lock;
uint32_t nsession;
char session[9];
rs->src = src;
if (cmd < 0)
- rs->shutdown_on_close = 1;
+ rs->shutdown_on_close = hc;
play:
if (pids.count > 0)
pthread_mutex_lock(&rtsp_lock);
for (rs = TAILQ_FIRST(&rtsp_sessions); rs; rs = rs_next) {
rs_next = TAILQ_NEXT(rs, link);
- if (rs->shutdown_on_close) {
+ if (rs->shutdown_on_close == hc) {
rtsp_close_session(rs);
rtsp_free_session(rs);
+ } else {
+ if (rs->rtp_peer_port == RTSP_TCP_DATA)
+ satip_rtp_close((void *)(intptr_t)rs->stream);
}
}
pthread_mutex_unlock(&rtsp_lock);