Skip to content

bus: warn if message queue grows too large

Xavier Claessens requested to merge xclaesse/gstreamer:bus-size into main

By default the message queue grows infinitely unless the application handles messages. For simple pipelines that does not need to handle messages and run for long periods this is very unexpected behaviour causing huge memory consumption over a few days of uptime and no obvious indication what's causing it.

Put a limit of 1024 messages (because queue size is a power of 2) and print a warning when dropping oldest message in the queue. That prevents unreasonable memory consumption while warning application developer that they should add a message handler.

Merge request reports