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 762859 - appsrc: max-bytes is silently ignored for block=FALSE
appsrc: max-bytes is silently ignored for block=FALSE
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-29 09:51 UTC by Heinrich Fink
Modified: 2018-11-03 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Heinrich Fink 2016-02-29 09:51:36 UTC
max-bytes is ignored when block=FALSE. A comment in appsrc.c (line 1659) says: 

/* no need to wait for free space, we just pump more data into the
 * queue hoping that the caller reacts to the enough-data signal and
 * stops pushing buffers. */

In a live pipeline, if downstream of appsrc is slow (e.g. overwhelmed encoder), but buffers are pushed into the appsrc as they arrive, then appsrc will be growing its queue infinitely, which is unexpected to the application that simply pushes buffers (and doesn't care about the enough-data signal).

Couldn't we just drop buffers for block=FALSE when max-bytes is reached?
Comment 1 Sebastian Dröge (slomo) 2016-02-29 10:23:46 UTC
I think that would be the expected behaviour, at least that's what I would expect and what people on the mailing list expected a few times when complaining about high memory usage.

Maybe this should get a drop property like appsink though, as it changes behaviour and might break existing applications.
Comment 2 Sebastian Dröge (slomo) 2016-02-29 11:34:08 UTC
Do you want to provide a patch?
Comment 3 GStreamer system administrator 2018-11-03 11:45:07 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/256.