[FFmpeg-cvslog] vsrc_buffer: remove dependency on AVFrame

Etienne Buira etienne.buira.lists at free.fr
Wed Jun 1 19:53:48 CEST 2011


On Thu, May 19, 2011 at 11:33:08PM +0200, Stefano Sabatini wrote:
> ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat May  7 21:35:08 2011 +0200| [6070b7e1c520e9ca389403bae20a2ad04c7d54c7] | committer: Stefano Sabatini
> 
> vsrc_buffer: remove dependency on AVFrame
> 
> Rename av_vsrc_buffer_add_frame to
> av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make
> it accept in input an AVFilterBufferRef rather than an AVFrame.
> 
> This way the interface can be used without requiring the
> inclusion/installation of libavcodec headers.
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6070b7e1c520e9ca389403bae20a2ad04c7d54c7

Hi all.

This commit seems to introduce/exhibit a serious memory leak that still
shows up in current master. Seems that frames that are decoded, but not
encoded (-ss) are not freed.

Here an execution trace: (-vcodec mpeg4 -acodec mp2 show same behaviour)
$ nice -n 19 ffmpeg -i 'input.ts' -ss 1719.02 -t 5092.72 -vcodec libx264 -preset veryslow -crf 25 -acodec libmp3lame -aq 9 -vf crop=1408:1056:16:12,yadif,scale=704:528 output.mp4
ffmpeg version git-N-30048-g6070b7e, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun  1 2011 19:33:10 with gcc 4.4.5
  configuration: --prefix=/home/etienne/usr/ --disable-doc --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-nonfree --enable-libfaac --enable-libmp3lame --enable-libx264
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  6. 0 / 53.  6. 0
  libavformat  53.  1. 0 / 53.  1. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  5. 0 /  2.  5. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mpegts @ 0x30ceb60] max_analyze_duration 5000000 reached at 5034667
Input #0, mpegts, from 'input.ts':
  Duration: 04:00:00.82, start: 4860.199700, bitrate: 4817 kb/s
  Program 56108
    Stream #0.0[0x44]: Video: h264 (High), yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 26.23 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x45](fra): Audio: aac, 48000 Hz, stereo, s16, 63 kb/s
    Stream #0.2[0x62](fra): Subtitle: [6][0][0][0] / 0x0006
    Stream #0.3[0x46](fra): Subtitle: [6][0][0][0] / 0x0006
File 'output.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x30ce7c0] w:1440 h:1080 pixfmt:yuv420p tb:1/1000000 sar:4/3
[yadif @ 0x32e07c0] mode:0 parity:-1
[crop @ 0x32dbb00] w:1440 h:1080 -> w:1408 h:1056
[scale @ 0x32e0da0] w:1408 h:1056 fmt:yuv420p -> w:704 h:528 fmt:yuv420p flags:0xa0000004
[libx264 @ 0x30ccf00] using SAR=4/3
[libx264 @ 0x30ccf00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x30ccf00] profile High, level 4.0
[libx264 @ 0x30ccf00] 264 - core 115 r1995 c1e60b9 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf53.1.0
    Stream #0.0: Video: libx264, yuv420p, 704x528 [PAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0.1(fra): Audio: libmp3lame, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
[buffer @ 0x30ce7c0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    Last message repeated 2 times
[aac @ 0x30d6160] channel element 3.5 is not allocated
Error while decoding stream #0.1
[buffer @ 0x30ce7c0] Buffering several frames is not supported. Please consume all available frames before adding a new one.
    Last message repeated 546 times   0kB time=10000000000.00 bitrate=   0.0kbits/s


More information about the ffmpeg-cvslog mailing list