Skip to content

Commit

Permalink
SmartPtr: Fix SRT leaking.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jul 4, 2024
1 parent 75ddd8f commit fe49fd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions trunk/3rdparty/srs-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ cd srs/trunk && ./configure --h265=on --gb28181=on && make &&
./objs/srs -c conf/console.conf
```

> Note: Use valgrind to check memory leak, please use `valgrind --leak-check=full ./objs/srs -c conf/console.conf >/dev/null` to start SRS.
具体场景,请按下面的操作启动测试。

## Player for WHEP
Expand Down
3 changes: 3 additions & 0 deletions trunk/src/app/srs_app_srt_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,9 @@ void SrsSrtSource::on_unpublish()

can_publish_ = true;

SrsStatistic* stat = SrsStatistic::instance();
stat->on_stream_close(req);

if (bridge_) {
frame_builder_->on_unpublish();
srs_freep(frame_builder_);
Expand Down

0 comments on commit fe49fd5

Please sign in to comment.