[FFmpeg-trac] #5871(ffmpeg:new): Memory leakage in acceletared encoding (h264_vaapi and hevc_vaapi)

FFmpeg trac at avcodec.org
Wed Sep 28 17:01:53 EEST 2016


#5871: Memory leakage in acceletared encoding (h264_vaapi and hevc_vaapi)
-------------------------------------+-------------------------------------
             Reporter:  hsyrja       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  git-
             Keywords:  memory       |  master
  leakage                            |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 How to reproduce:
 {{{
 % ffmpeg -y -vaapi_device /dev/dri/renderD128 -hwaccel vaapi
 -hwaccel_output_format yuv420p -i file.264 -an -vf format=nv12,hwupload
 -c:v hevc_vaapi -quality 1 -f mpegts /dev/null
 ffmpeg version N-81786-g2586668
 built on with --enable-nonfree --enable-gpl --enable-version3 --enable-
 vaapi --enable-libx264
 gcc 4.9.2 (Debian 4.9.2-10)

 Memory leakage is around 1-3 MB/s: input stream res is 720p50fps: do not
 happen with gstreamer


 Valgrind (--tool=massif)

 ms_print massif.out.pid report:

     MB
 138.0^
 #
      |
 @:@#
      |
 @@@:@:@#
      |                                                             @@@@@
 :@:@#
      |                                                         @@::@@ @@
 :@:@#
      |                                                    @::::@ : @@ @@
 :@:@#
      |                                                ::::@: ::@ : @@ @@
 :@:@#
      |                                             :::: : @: ::@ : @@ @@
 :@:@#
      |                                         @::::::: : @: ::@ : @@ @@
 :@:@#
      |                                     :@@:@:: :::: : @: ::@ : @@ @@
 :@:@#
      |                                 @@:::@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |                             @@::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |                          :::@ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |                       ::::: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |                  ::::::: :: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |              @::::: : :: :: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |        @  :::@:: :: : :: :: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      |     :@@@:::: @:: :: : :: :: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      | :::::@ @: :: @:: :: : :: :: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
      | : : :@ @: :: @:: :: : :: :: @ ::@ : :@ :@:: :::: : @: ::@ : @@ @@
 :@:@#
    0
 +----------------------------------------------------------------------->Gi
      0
 44.40

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
  52 47,650,320,026      143,592,272      137,496,744     6,095,528
 0
  53 47,675,824,211      144,695,208      138,597,208     6,098,000
 0
 95.79% (138,597,208B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->73.56% (106,431,164B) 0xD241E83: i965_create_buffer_internal
 (i965_drv_video.c:2525)
 | ->73.56% (106,431,164B) 0xD24206D: i965_CreateBuffer
 (i965_drv_video.c:2549)
 |   ->73.56% (106,431,164B) 0x5238961: vaCreateBuffer (va.c:1058)
 |     ->61.98% (89,678,400B) 0xE160F1: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     | ->61.98% (89,678,400B) 0xE16594: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     |   ->61.98% (89,676,300B) 0xE16845: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     |   | ->61.98% (89,676,300B) 0xA64E81: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     |   |   ->61.98% (89,676,300B) 0x493E59: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     |   |     ->61.98% (89,676,300B) 0x498D9D: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     |   |       ->61.98% (89,676,300B) 0x49A971: ??? (in
 /home/hsyrja/test/ffmpeg/ffmpeg)
 |     |   |         ->61.98% (89,676,300B) 0x47D2AA: main (in
 /home/hsyrja/test/ffmpeg/ffmpeg)

 }}}

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


More information about the FFmpeg-trac mailing list