[FFmpeg-trac] #7224(avutil:new): memory leak av_codec_send_packet

FFmpeg trac at avcodec.org
Tue May 22 23:31:59 EEST 2018


#7224: memory leak av_codec_send_packet
-------------------------------------+-------------------------------------
             Reporter:  msafroshkin  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avutil       |                  Version:  git-
             Keywords:  memory leak  |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 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);
         }
     }
 }}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7224>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list