GNOME Bugzilla – Bug 762859
appsrc: max-bytes is silently ignored for block=FALSE
Last modified: 2018-11-03 11:45:07 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?
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.
Do you want to provide a patch?
-- 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.