GNOME Bugzilla – Bug 751297
rtprtxqueue: reverse pending list before pushing buffers
Last modified: 2015-06-22 12:42:45 UTC
Created attachment 305783 [details] [review] rtprtxqueue: reverse pending list before pushing buffers With this change, the RTX buffers are sent in the same order that they were requested.
Is this a regression or was it always broken? The patch is obviously correct though, will push it later.
I think that it was always broken :S.
Review of attachment 305783 [details] [review]: That list is probably small, but still, I'd simply port to use GQueue, and avoid having to reverse the list (or pay the cost of append).
commit 40957a92127a913d61295be629f72c72f83548c7 Author: Miguel París Díaz <mparisdiaz@gmail.com> Date: Fri Jun 19 14:50:59 2015 +0200 rtprtxqueue: reverse pending list before pushing buffers With this we send the RTX buffers in the same order that they were requested. https://bugzilla.gnome.org/show_bug.cgi?id=751297
If someone wants to port to GQueue, just go ahead. It doesn't make things much better here though as you'll have to somehow steal the list from the queue (there is no API for that), or copy the list and clear the queue.
(In reply to Sebastian Dröge (slomo) from comment #5) > If someone wants to port to GQueue, just go ahead. It doesn't make things > much better here though as you'll have to somehow steal the list from the > queue (there is no API for that), or copy the list and clear the queue. You don't need an API for that really.
Yeah you could just set head, tail to NULL and length to 0. But that seems quite ugly :)
You usually use a GQueue on the stack, and when you 'steal it' you usually don't need the GQueue struct any longer, so you just e.g. return queue.head and be done with it.
Yes but here the GQueue/GList is something stored in the instance struct