Skip to content

Commit

Permalink
fixe merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nicotyze committed Aug 8, 2024
1 parent 3e0a1eb commit d866e6e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ static struct config core_config = {
"", "",
640, 480,
1000000,
0,
0,
30,
true,
VID_FMT_YUV420P,
Expand Down
1 change: 1 addition & 0 deletions src/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions src/rtprecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 3 additions & 0 deletions src/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d866e6e

Please sign in to comment.