Skip to content

Commit

Permalink
BugFix: Resolve the problem of srs_error_t memory leak. v5.0.163, v6.…
Browse files Browse the repository at this point in the history
…0.57 (#3605)

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
  • Loading branch information
3 people authored and winlinvip committed Jul 1, 2023
1 parent 3955d3f commit 17f0d1f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The changelog for SRS.

## SRS 5.0 Changelog

* v5.0, 2023-07-01, Merge [#3605](https://github.com/ossrs/srs/pull/3605): BugFix: Resolve the problem of srs_error_t memory leak. v5.0.163 (#3605)
* v5.0, 2023-06-30, Merge [#3596](https://github.com/ossrs/srs/pull/3596): Improve the usage of "transcode" in the "full.conf" file. v5.0.162 (#3596)
* v5.0, 2023-06-21, Merge [#3551](https://github.com/ossrs/srs/pull/3551): H264: Fix H.264 ISOM reserved bit value. v5.0.161 (#3551)
* v5.0, 2023-06-20, Merge [#3592](https://github.com/ossrs/srs/pull/3592): Fix Permission Issue in depend.sh for OpenSSL Compilation. v5.0.159 (#3592)
Expand Down
1 change: 1 addition & 0 deletions trunk/src/app/srs_app_dvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ void SrsDvrSessionPlan::on_unpublish()
srs_error_t err = segment->close();
if (err != srs_success) {
srs_warn("ignore flv close error %s", srs_error_desc(err).c_str());
srs_error_reset(err);
}

dvr_enabled = false;
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 162
#define VERSION_REVISION 163

#endif
6 changes: 3 additions & 3 deletions trunk/src/kernel/srs_kernel_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ srs_error_t SrsMpegPES::decode_33bits_dts_pts(SrsBuffer* stream, int64_t* pv)
}

// decode the 33bits schema.
// ===========1B
// ----------1B
// 4bits const maybe '0001', '0010' or '0011'.
// 3bits DTS/PTS [32..30]
// 1bit const '1'
Expand All @@ -1835,7 +1835,7 @@ srs_error_t SrsMpegPES::decode_33bits_dts_pts(SrsBuffer* stream, int64_t* pv)
}
dts_pts_30_32 = (dts_pts_30_32 >> 1) & 0x07;

// ===========2B
// ----------2B
// 15bits DTS/PTS [29..15]
// 1bit const '1'
int64_t dts_pts_15_29 = stream->read_2bytes();
Expand All @@ -1844,7 +1844,7 @@ srs_error_t SrsMpegPES::decode_33bits_dts_pts(SrsBuffer* stream, int64_t* pv)
}
dts_pts_15_29 = (dts_pts_15_29 >> 1) & 0x7fff;

// ===========2B
// ----------2B
// 15bits DTS/PTS [14..0]
// 1bit const '1'
int64_t dts_pts_0_14 = stream->read_2bytes();
Expand Down
12 changes: 6 additions & 6 deletions trunk/src/kernel/srs_kernel_ts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,14 +824,14 @@ class SrsMpegPES
// presentation unit k of elementary stream n. The value of PTS is specified in units of the period of the system clock
// frequency divided by 300 (yielding 90 kHz). The presentation time is derived from the PTS according to equation 2-11
// below. Refer to 2.7.4 for constraints on the frequency of coding presentation timestamps.
// ===========1B
// ----------1B
// 4bits const
// 3bits PTS [32..30]
// 1bit const '1'
// ===========2B
// ----------2B
// 15bits PTS [29..15]
// 1bit const '1'
// ===========2B
// ----------2B
// 15bits PTS [14..0]
// 1bit const '1'
int64_t pts; // 33bits
Expand All @@ -840,14 +840,14 @@ class SrsMpegPES
// The DTS is a 33-bit number coded in three separate fields. It indicates the decoding time,
// td n (j), in the system target decoder of an access unit j of elementary stream n. The value of DTS is specified in units of
// the period of the system clock frequency divided by 300 (yielding 90 kHz).
// ===========1B
// ----------1B
// 4bits const
// 3bits DTS [32..30]
// 1bit const '1'
// ===========2B
// ----------2B
// 15bits DTS [29..15]
// 1bit const '1'
// ===========2B
// ----------2B
// 15bits DTS [14..0]
// 1bit const '1'
int64_t dts; // 33bits
Expand Down

0 comments on commit 17f0d1f

Please sign in to comment.