mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #515, merge from srs2, use SrsAutoFreeA.
This commit is contained in:
parent
604486b0a3
commit
f57e537686
14 changed files with 54 additions and 37 deletions
|
@ -548,7 +548,7 @@ int SrsRtspSdp::parse_fmtp_attribute(string attr)
|
|||
}
|
||||
|
||||
char* tmp_sh = new char[item_value.length()];
|
||||
SrsAutoFree(char, tmp_sh);
|
||||
SrsAutoFreeA(char, tmp_sh);
|
||||
int nb_tmp_sh = ff_hex_to_data((u_int8_t*)tmp_sh, item_value.c_str());
|
||||
srs_assert(nb_tmp_sh > 0);
|
||||
audio_sh.append(tmp_sh, nb_tmp_sh);
|
||||
|
@ -603,7 +603,7 @@ string SrsRtspSdp::base64_decode(string value)
|
|||
|
||||
int nb_output = (int)(value.length() * 2);
|
||||
u_int8_t* output = new u_int8_t[nb_output];
|
||||
SrsAutoFree(u_int8_t, output);
|
||||
SrsAutoFreeA(u_int8_t, output);
|
||||
|
||||
int ret = srs_av_base64_decode(output, (char*)value.c_str(), nb_output);
|
||||
if (ret <= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue