mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix memory leak when replace rtp packet in cache. (#2771). v4.0.205
* fix memory leak when replace rtp packet in cache.
This commit is contained in:
parent
3eb8fa2e31
commit
7c353b5986
3 changed files with 9 additions and 6 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 4.0 Changelog
|
## SRS 4.0 Changelog
|
||||||
|
|
||||||
|
* v4.0, 2021-12-07, Merge [#2771](https://github.com/ossrs/srs/pull/2771): RTC: Fix memory leak when replace rtp packet in cache. (#2771). v4.0.205
|
||||||
* v4.0, 2021-12-06, Merge [#2766](https://github.com/ossrs/srs/pull/2766): RTC: Fix nack encode seqnum. (#2766). v4.0.204
|
* v4.0, 2021-12-06, Merge [#2766](https://github.com/ossrs/srs/pull/2766): RTC: Fix nack encode seqnum. (#2766). v4.0.204
|
||||||
* v4.0, 2021-12-04, Merge [#2768](https://github.com/ossrs/srs/pull/2768): RTC: Fix bugs for RTC2RTMP. (#2768). v4.0.203
|
* v4.0, 2021-12-04, Merge [#2768](https://github.com/ossrs/srs/pull/2768): RTC: Fix bugs for RTC2RTMP. (#2768). v4.0.203
|
||||||
* v4.0, 2021-12-04, Merge [#2757](https://github.com/ossrs/srs/pull/2757): RTC: Ignore empty audio packet when transcoding (#2757). v4.0.202
|
* v4.0, 2021-12-04, Merge [#2757](https://github.com/ossrs/srs/pull/2757): RTC: Ignore empty audio packet when transcoding (#2757). v4.0.202
|
||||||
|
|
|
@ -1437,6 +1437,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video(SrsRtpPacket* src)
|
||||||
// store in cache
|
// store in cache
|
||||||
int index = cache_index(pkt->header.get_sequence());
|
int index = cache_index(pkt->header.get_sequence());
|
||||||
cache_video_pkts_[index].in_use = true;
|
cache_video_pkts_[index].in_use = true;
|
||||||
|
srs_freep(cache_video_pkts_[index].pkt);
|
||||||
cache_video_pkts_[index].pkt = pkt;
|
cache_video_pkts_[index].pkt = pkt;
|
||||||
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
||||||
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
||||||
|
@ -1526,6 +1527,7 @@ srs_error_t SrsRtmpFromRtcBridger::packet_video_key_frame(SrsRtpPacket* pkt)
|
||||||
|
|
||||||
uint16_t index = cache_index(pkt->header.get_sequence());
|
uint16_t index = cache_index(pkt->header.get_sequence());
|
||||||
cache_video_pkts_[index].in_use = true;
|
cache_video_pkts_[index].in_use = true;
|
||||||
|
srs_freep(cache_video_pkts_[index].pkt);
|
||||||
cache_video_pkts_[index].pkt = pkt;
|
cache_video_pkts_[index].pkt = pkt;
|
||||||
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
cache_video_pkts_[index].sn = pkt->header.get_sequence();
|
||||||
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
cache_video_pkts_[index].ts = pkt->get_avsync_time();
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 204
|
#define VERSION_REVISION 205
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue