Skip to content

Commit fe23036

Browse files
wrennywangduiniuluantanqinchundonglinlin
authored
BugFix: Resolve the problem of srs_error_t memory leak. v5.0.163, v6.0.57 (#3605)
--------- Co-authored-by: Haibo Chen <[email protected]> Co-authored-by: chundonglinlin <[email protected]>
1 parent 7ba59c3 commit fe23036

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

trunk/doc/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The changelog for SRS.
88

99
## SRS 6.0 Changelog
1010

11+
* v6.0, 2023-07-01, Merge [#3605](https://github.com/ossrs/srs/pull/3605): BugFix: Resolve the problem of srs_error_t memory leak. v6.0.57 (#3605)
1112
* v6.0, 2023-06-30, Merge [#3596](https://github.com/ossrs/srs/pull/3596): Improve the usage of "transcode" in the "full.conf" file. v6.0.56 (#3596)
1213
* v6.0, 2023-06-21, Merge [#3551](https://github.com/ossrs/srs/pull/3551): H264: Fix H.264 ISOM reserved bit value. v6.0.55 (#3551)
1314
* v6.0, 2023-06-20, Merge [#3594](https://github.com/ossrs/srs/pull/3594): Docker: Refine the main dockerfile. v6.0.54 (#3592)
@@ -70,6 +71,7 @@ The changelog for SRS.
7071

7172
## SRS 5.0 Changelog
7273

74+
* 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)
7375
* 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)
7476
* 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)
7577
* 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)

trunk/src/app/srs_app_dvr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ void SrsDvrSessionPlan::on_unpublish()
737737
srs_error_t err = segment->close();
738738
if (err != srs_success) {
739739
srs_warn("ignore flv close error %s", srs_error_desc(err).c_str());
740+
srs_error_reset(err);
740741
}
741742

742743
dvr_enabled = false;

trunk/src/core/srs_core_version5.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#define VERSION_MAJOR 5
1111
#define VERSION_MINOR 0
12-
#define VERSION_REVISION 162
12+
#define VERSION_REVISION 163
1313

1414
#endif

trunk/src/core/srs_core_version6.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
#define VERSION_MAJOR 6
1111
#define VERSION_MINOR 0
12-
#define VERSION_REVISION 56
12+
#define VERSION_REVISION 57
1313

1414
#endif

trunk/src/protocol/srs_protocol_raw_avc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ srs_error_t SrsRawHEVCStream::mux_sequence_header(std::string vps, std::string s
409409

410410
SrsFormat format;
411411
if ((err = format.initialize()) != srs_success) {
412-
return srs_error_new(ERROR_STREAM_CASTER_HEVC_FORMAT, "format failed");
412+
return srs_error_wrap(err, "format failed");
413413
}
414414
// hevc_dec_conf_record
415415
SrsHevcDecoderConfigurationRecord *hevc_info = &format.vcodec->hevc_dec_conf_record_;
@@ -420,15 +420,15 @@ srs_error_t SrsRawHEVCStream::mux_sequence_header(std::string vps, std::string s
420420
// @doc ITU-T-H.265-2021.pdf, page 54.
421421
SrsBuffer vps_stream((char*)vps.data(), vps.length());
422422
if ((err = format.hevc_demux_vps(&vps_stream)) != srs_success) {
423-
return srs_error_new(ERROR_STREAM_CASTER_HEVC_VPS, "vps demux failed, len=%d", vps.length());
423+
return srs_error_wrap(err, "vps demux failed, len=%d", vps.length());
424424
}
425425

426426
// H265 SPS Nal Unit (seq_parameter_set_rbsp()) parser.
427427
// @see Section 7.3.2.2 ("Sequence parameter set RBSP syntax") of the H.265
428428
// @doc ITU-T-H.265-2021.pdf, page 55.
429429
SrsBuffer sps_stream((char*)sps.data(), sps.length());
430430
if ((err = format.hevc_demux_sps(&sps_stream)) != srs_success) {
431-
return srs_error_new(ERROR_STREAM_CASTER_HEVC_SPS, "sps demux failed, len=%d",sps.length());
431+
return srs_error_wrap(err, "sps demux failed, len=%d",sps.length());
432432
}
433433
}
434434

0 commit comments

Comments
 (0)