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 674791 - [0.11] GstAdapter reports incorrect timestamps when buffers are merged
[0.11] GstAdapter reports incorrect timestamps when buffers are merged
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other All
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-25 12:38 UTC by Matej Knopp
Modified: 2012-05-01 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (3.59 KB, patch)
2012-04-25 12:38 UTC, Matej Knopp
none Details | Review

Description Matej Knopp 2012-04-25 12:38:22 UTC
Created attachment 212773 [details] [review]
Patch

Attached is a proof of concept patch that record timestamps of merged buffers so that adapter's pts and dts can be properly updated on flush.
Comment 1 Wim Taymans 2012-05-01 08:54:35 UTC
I don't know.. Adapter should be rewritten using the new 0.11 memory objects, it feels weird to add this new complexity. OTOH it might be better than leaving the current broken behaviour. 

This problem is also in 0.10 but there is doesn't show up because most buffer are not spanning. In 0.11 we always assume the buffer is spanning and use the buffer API to let it merge when possible.

I finally decided to remove the try_merge_up entirely, it should not be called often and if it is called, it would also break with 0.10. Hopefully it encourages someone to rewrite with 0.11 features in mind.


commit 1b87a07d8e513b2e72a675eb5c101f6cdf666146
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue May 1 10:50:32 2012 +0200

    adapter: remove _try_to_merge_up()
    
    It causes the timestamp to go wrong, should not cause much of a performance
    increase and in the cases where it is faster, it is broken in 0.10 as well.
    We should try to review this when rewriting the adapter for 0.11 memory
    features.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674791
Comment 2 Matej Knopp 2012-05-01 16:55:49 UTC
Your commit seems to have fixed the problem I was having. Thanks.