mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support address sanitizer for utest and fix some leaks. (#3242)
* MP4: Fix memory leak when error. * Kernel: Support free global objects for utest. * HTTP: Fix memory leak when error. * MP4: Support more sample rate for audio. * RTMP: Support free field for utest. * UTest: Support address sanitizer.
This commit is contained in:
parent
be0241efdb
commit
368356c223
18 changed files with 360 additions and 154 deletions
|
@ -68,7 +68,7 @@ VOID TEST(KernelRTCTest, RtpSTAPPayloadException)
|
|||
EXPECT_TRUE(nalu_type == kStapA);
|
||||
ISrsRtpPayloader* payload = new SrsRtpSTAPPayload();
|
||||
|
||||
EXPECT_TRUE((err = payload->decode(&buf)) != srs_success);
|
||||
HELPER_ASSERT_FAILED(payload->decode(&buf));
|
||||
srs_freep(payload);
|
||||
}
|
||||
|
||||
|
@ -710,7 +710,8 @@ VOID TEST(KernelRTCTest, NACKFetchRTPPacket)
|
|||
SrsRtcPlayStream play(&s, SrsContextId());
|
||||
|
||||
SrsRtcTrackDescription ds;
|
||||
SrsRtcVideoSendTrack *track = new SrsRtcVideoSendTrack(&s, &ds);
|
||||
SrsRtcVideoSendTrack* track = new SrsRtcVideoSendTrack(&s, &ds);
|
||||
SrsAutoFree(SrsRtcVideoSendTrack, track);
|
||||
|
||||
// The RTP queue will free the packet.
|
||||
if (true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue