GNOME Bugzilla – Bug 737739
souphttpclientsink: Restarting after error results in buffers being queued forever
Last modified: 2014-10-14 07:44:25 UTC
Created attachment 287532 [details] [review] Free queued buffers in reset $subject, the problem seems to be that ::reset() doesn't drop buffers, and when the element is restarted, ::render() waits forever for the old buffers to be written out before scheduling a new callback to write out new buffers. The attached patch fixes this.
Created attachment 287533 [details] [review] Add some useful debugging output The attached patch adds some logging to cases where the code drops or queues buffers; useful while debugging issues, but not necessary. :)
commit 374552a72093fa74e7d99f5a02219ce6674ff611 Author: Nirbheek Chauhan <nirbheek@centricular.com> Date: Wed Oct 1 23:12:30 2014 +0530 souphttpclientsink: Add some more useful debug logging commit 745d49731810d774463e72b03e759092e2b2e8b7 Author: Nirbheek Chauhan <nirbheek@centricular.com> Date: Wed Oct 1 23:05:03 2014 +0530 souphttpclientsink: Free queued buffers in ::reset ::render sets a new callback for writing out new buffers only if there aren't already buffers queued for writing with a previously-scheduled callback. However, if the previously-scheduled callback is interrupted by a state change (either manually or due to an error) and there are still buffers in the queue, restarting the pipeline will result in buffers being queued forever, and no callbacks will ever be scheduled, and no buffers will be written out. https://bugzilla.gnome.org/show_bug.cgi?id=737739