#7224 closed defect (invalid)
memory leak av_codec_send_packet
Reported by: | hagorms | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
when do avcodec_send_packet, av_util 5.6 allocates memory and never cleans it
How to reproduce:
{connect ip camera or open long video in h264
{
while (1)
{
av_read_frame(m_format_ctx_ptr, m_packet);
const int res = avcodec_send_packet(m_codec_ctx_ptr, m_packet);
if (res != 0) {
return;}
while (avcodec_receive_frame(m_codec_ctx_ptr, m_picture_ptr) == 0)
{
const int err_height = sws_scale(m_img_convert_ctx_ptr,
m_picture_ptr->data, m_picture_ptr->linesize, 0,
m_codec_ctx_ptr->height,
m_picture_rgb_ptr->data, m_picture_rgb_ptr->linesize);
av_frame_unref(m_picture_ptr);
}
}
}}
Attachments (1)
Change History (5)
by , 7 years ago
Attachment: | memory_leak_callstack.png added |
---|
comment:1 by , 7 years ago
Component: | avutil → avcodec |
---|
comment:2 by , 7 years ago
memory releases when I do :
avcodec_flush_buffers(m_codec_ctx_ptr);
avcodec_free_context(&m_codec_ctx_ptr);
comment:3 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 by , 7 years ago
Component: | avcodec → undetermined |
---|---|
Keywords: | memory leak removed |
memory leak callstack