GNOME Bugzilla – Bug 645858
[flvdemux] memory leak when demuxing infinite FLV files
Last modified: 2011-03-28 17:54:51 UTC
Created attachment 184382 [details] [review] patch to fix the issue This will cause flvdemux to grow infinitely in memory: gst-launch videotestsrc ! ffenc_flv ! flvmux ! flvdemux ! fakesink The problem is that it tries to build an index if it hasn't found one in the metadata tag and with infinite (for instance streamed) FLV files it keeps on building the index. A solution would be to check if upstream handles seeking and skip building the index if it doesn't. Patch to that effect attached. It's based on how baseparse checks for upstream_seekable (actually, it's mostly copy/paste from baseparse).
commit 9c5a12c11ff971bf93b3275b7b6a3fcc25cff8f0 Author: Jan Urbański <wulczer@wulczer.org> Date: Sun Mar 27 21:39:50 2011 +0200 flvdemux: Do not build an index if upstream is not seekable An index is not useful if upstream cannot handle seeks and building it for infinite files, for instance FLV streams, results in a memory leak.