Queue not handling caps queries correctly?
Greetings, I would like to report a potential issue. Queues, even though asynchronously pushing buffers, seem to synchronously query the upstream element for the current caps.
However, i find it logical, that since a queue pops buffers and events, the queue should answer the query with the last caps it popped. A caps event might be received late, so the caps of the upstream element are already changed and not the same as the popped ones. That leads to an error when linking a pad dynamically.
Specific use case
I am creating a demuxer whose caps change throughout the stream. Every demuxer pad needs to be in front of a queue. I am using a probe to relink the pipeline from the queue onwards on each caps change. However, during the relink, even though my probe gets the latest caps coming out of the queue, some elements I link query the queue caps, and that in turn asks for the CURRENT demuxer caps, which are much later in the timeline, e.g at second 5, even though we are relinking for second 1.
I can bypass it by using an upstream query probe, but i was wondering if i am doing something wrong. Thank you.