GNOME Bugzilla – Bug 723473
rtpbasepayload: wait for all buffers in a list to be sent before flushing
Last modified: 2014-02-04 12:50:23 UTC
Created attachment 267846 [details] [review] locking patch Pushing a buffer list locks the payloader's source pad only when pushing a buffer. If an intervening flush comes through, this means only the first few buffers may be pushed before the soure pad becomes flushing. This could cause a spurious discontinuity, so we lock the (recursive) stream lock on the source pad to ensure all buffers are pushed atomically. However, there are two cases where one needs the flush to break in the middle of a list: - when the flush is triggered by a seek from downstream (in this case, since downstream will block till the original request finishes, it will not process any further buffers (if it does both in the same thread anyway)). - when a state change occurs Not 100% sure about this. It fixes a spurious discontinuity in a test case, but the need for exceptions feels a bit unfortunate.
A flush will be forwarded upstream, the remaining buffers from the list are pushed and dropped. Then the flush-stop can go through and new buffers can be pushed. A flush is supposed to created a DISCONT. What is the problem?
After discussion on IRC, this is not a good idea, and should be done at a higher layer if needed. Closing as NOTABUG since it all technically behaves as designed.