GNOME Bugzilla – Bug 674791
[0.11] GstAdapter reports incorrect timestamps when buffers are merged
Last modified: 2012-05-01 16:55:49 UTC
Created attachment 212773 [details] [review]
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.
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.
Author: Wim Taymans <firstname.lastname@example.org>
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
Your commit seems to have fixed the problem I was having. Thanks.