After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645858 - [flvdemux] memory leak when demuxing infinite FLV files
[flvdemux] memory leak when demuxing infinite FLV files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-27 19:42 UTC by Jan Urbański
Modified: 2011-03-28 17:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the issue (3.46 KB, patch)
2011-03-27 19:42 UTC, Jan Urbański
committed Details | Review

Description Jan Urbański 2011-03-27 19:42:58 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).
Comment 1 Sebastian Dröge (slomo) 2011-03-28 17:54:46 UTC
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.