After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751297 - rtprtxqueue: reverse pending list before pushing buffers
rtprtxqueue: reverse pending list before pushing buffers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.5.1
Other Linux
: Normal normal
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-21 20:18 UTC by Miguel París Díaz
Modified: 2015-06-22 12:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtprtxqueue: reverse pending list before pushing buffers (1.12 KB, patch)
2015-06-21 20:18 UTC, Miguel París Díaz
committed Details | Review

Description Miguel París Díaz 2015-06-21 20:18:27 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.
Comment 1 Sebastian Dröge (slomo) 2015-06-21 20:37:16 UTC
Is this a regression or was it always broken? The patch is obviously correct though, will push it later.
Comment 2 Miguel París Díaz 2015-06-21 20:47:06 UTC
I think that it was always broken :S.
Comment 3 Nicolas Dufresne (ndufresne) 2015-06-21 22:39:49 UTC
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).
Comment 4 Sebastian Dröge (slomo) 2015-06-22 09:36:48 UTC
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
Comment 5 Sebastian Dröge (slomo) 2015-06-22 09:38:06 UTC
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.
Comment 6 Nicolas Dufresne (ndufresne) 2015-06-22 12:25:17 UTC
(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.
Comment 7 Sebastian Dröge (slomo) 2015-06-22 12:29:13 UTC
Yeah you could just set head, tail to NULL and length to 0. But that seems quite ugly :)
Comment 8 Tim-Philipp Müller 2015-06-22 12:39:31 UTC
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.
Comment 9 Sebastian Dröge (slomo) 2015-06-22 12:42:45 UTC
Yes but here the GQueue/GList is something stored in the instance struct