[FFmpeg-trac] #3338(FFmpeg:new): Memory leak playing ogv videos

FFmpeg trac at avcodec.org
Tue Jan 21 14:39:06 CET 2014


#3338: Memory leak playing ogv videos
-------------------------------------+-------------------------------------
             Reporter:  romain145    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  FFmpeg       |                  Version:
             Keywords:  memory       |  unspecified
  leak, ogv, avi                     |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Hello,

 using the ffmpeg library as part of an SDL application to play ogv video
 files, I face memory leaks at the end of the video. Ogv videos are
 generated with ffmpeg2theora.
 {{{
 $ ffmpeg2theora
 ffmpeg2theora 0.27 - Xiph.Org libtheora 1.1 20090822 (Thusnelda)
 }}}

 FFmpeg version :
 {{{
 $ ffmpeg
 ffmpeg version N-59766-ge11983b Copyright (c) 2000-2014 the FFmpeg
 developers
  built on Jan 11 2014 17:06:41 with gcc 4.7 (Debian 4.7.2-5)
  configuration: --disable-optimizations
  libavutil      52. 62.100 / 52. 62.100
  libavcodec     55. 47.101 / 55. 47.101
  libavformat    55. 22.103 / 55. 22.103
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     4.  1.100 /  4.  1.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
 Hyper fast Audio and Video encoder
 usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
 outfile}...
 }}}

 Commands called at the end of each frame decoding :
 {{{
 av_free_packet(&packet);
 SDL_DestroyTexture(bmpTex1);
 av_free(pFrame);
 av_free(pFrame_YUV420P);
 av_free(buffer_YUV420P);
 }}}

 At the end of the video :
 {{{
 av_free_packet(&packet);
 avcodec_close(pCodecCtx);
 av_close_input_file(pFormatCtx);
 }}}

 Using the same code, playing an avi video file it doesn't show any memory
 leak.

 Video files details :
 gears2.ogv file is 2.1MB
 {{{
 $ ffmpeg -i gears2.ogv
 [...]
 Input #0, ogg, from 'gear2.ogv':
  Duration: 00:00:02.08, start: 0.000000, bitrate: 8167 kb/s
    Stream #0:0: Video: theora, yuv420p, 1024x768 [SAR 3:4 DAR 1:1], 25
 tbr, 25 tbn, 25 tbc
    Metadata:
      MAJOR_BRAND     : MSNV
      MINOR_VERSION   : 16786688
      COMPATIBLE_BRANDS: MSNVisommp42
      CREATION_TIME   : 2013-11-14 14:37:55
      ENCODER         : Lavf54.6.100
 }}}

 2.avi file is 144MB
 {{{
 $ ffmpeg -i 2.avi
 [...]
 Input #0, avi, from '2.avi':
  Duration: 00:00:02.03, start: 0.000000, bitrate: 566614 kb/s
    Stream #0:0: Video: rawvideo, bgr24, 1024x768, 30 tbr, 30 tbn, 30 tbc
 }}}

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


More information about the FFmpeg-trac mailing list