From d866e6e9db9c72add6bded1e0ce700492ff5aa42 Mon Sep 17 00:00:00 2001 From: Nicolas Tizon Date: Thu, 8 Aug 2024 17:24:25 +0200 Subject: [PATCH] fixe merge --- src/config.c | 2 ++ src/core.h | 1 + src/rtprecv.c | 10 ++++++++++ src/stream.c | 3 +++ 4 files changed, 16 insertions(+) diff --git a/src/config.c b/src/config.c index 2fae443c0b..02e69ded2b 100644 --- a/src/config.c +++ b/src/config.c @@ -77,6 +77,8 @@ static struct config core_config = { "", "", 640, 480, 1000000, + 0, + 0, 30, true, VID_FMT_YUV420P, diff --git a/src/core.h b/src/core.h index 30eb480154..ebe1f022a1 100644 --- a/src/core.h +++ b/src/core.h @@ -527,6 +527,7 @@ void rtprecv_set_socket(struct rtp_receiver *rx, struct rtp_sock *rtp); void rtprecv_set_ssrc(struct rtp_receiver *rx, uint32_t ssrc); uint64_t rtprecv_ts_last(struct rtp_receiver *rx); void rtprecv_set_ts_last(struct rtp_receiver *rx, uint64_t ts_last); +void rtprecv_set_estab(struct rtp_receiver *rx, bool estab); void rtprecv_flush(struct rtp_receiver *rx); void rtprecv_enable(struct rtp_receiver *rx, bool enable); int rtprecv_get_ssrc(struct rtp_receiver *rx, uint32_t *ssrc); diff --git a/src/rtprecv.c b/src/rtprecv.c index a3c4cfb902..c1046701ba 100644 --- a/src/rtprecv.c +++ b/src/rtprecv.c @@ -578,6 +578,16 @@ void rtprecv_set_ts_last(struct rtp_receiver *rx, uint64_t ts_last) mtx_unlock(rx->mtx); } +void rtprecv_set_estab(struct rtp_receiver *rx, bool estab) +{ + if (!rx) + return; + + mtx_lock(rx->mtx); + rx->rtp_estab = estab; + mtx_unlock(rx->mtx); +} + void rtprecv_flush(struct rtp_receiver *rx) { diff --git a/src/stream.c b/src/stream.c index 8b2ad4eb0c..42dee8fb70 100644 --- a/src/stream.c +++ b/src/stream.c @@ -285,6 +285,9 @@ static void stream_close(struct stream *strm, int err) stream_enable(strm, false); strm->errorh = NULL; + rtprecv_set_estab(strm->rx, false); + rtprecv_flush(strm->rx); + strm->rx = mem_deref(strm->rx); if (errorh) errorh(strm, err, strm->sess_arg);