Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h265_stream.cpp have some memory leaks #14

Open
CaiGiBear opened this issue Jan 18, 2023 · 1 comment
Open

h265_stream.cpp have some memory leaks #14

CaiGiBear opened this issue Jan 18, 2023 · 1 comment

Comments

@CaiGiBear
Copy link

Some codes like this:

vector <> m_vector;
size != 0;
fun()
{
memset(m_vector,0,sizof(m_vector) ) ;
m_vector.resize(size); //leaks
}

such as:
void h265_read_slice_header(h265_stream_t* h, bs_t* b){
...
memset(hrd, 0, sizeof(h265_slice_header_t));
...
hrd->entry_point_offset_minus1.resize(hrd->num_entry_point_offsets);
}

the same:
h265_read_vps_rbsp()
h265_read_sps_rbsp()
h265_read_pps_rbsp()

@scropothree
Copy link

Some codes like this:

vector <> m_vector; size != 0; fun() { memset(m_vector,0,sizof(m_vector) ) ; m_vector.resize(size); //leaks }

such as: void h265_read_slice_header(h265_stream_t* h, bs_t* b){ ... memset(hrd, 0, sizeof(h265_slice_header_t)); ... hrd->entry_point_offset_minus1.resize(hrd->num_entry_point_offsets); }

the same: h265_read_vps_rbsp() h265_read_sps_rbsp() h265_read_pps_rbsp()

我发现了同样的问题,这个有什么解决办法么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants