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 339678 - [matroskamux] wrong timestamps of B-frames
[matroskamux] wrong timestamps of B-frames
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal major
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-25 09:03 UTC by Josef Zlomek
Modified: 2006-04-25 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Signed relative timestamp (2.32 KB, patch)
2006-04-25 09:04 UTC, Josef Zlomek
committed Details | Review

Description Josef Zlomek 2006-04-25 09:03:15 UTC
When using B-frames, some frames have lower timestamps than the preceding ones (because of decoding order of frames, e.g. IPBB). The code is computing the timestamp relative to cluster time in unsigned integers. When the difference is negative, the result is completely wierd.
The relative timestamp should be signed according to the description in the end of http://www.matroska.org/technical/specs/index.html  

The attached patch changes the computation of relative timestamp to signed integers and adds rounding (i.e. division with rounding).
Comment 1 Josef Zlomek 2006-04-25 09:04:14 UTC
Created attachment 64263 [details] [review]
Signed relative timestamp
Comment 2 Tim-Philipp Müller 2006-04-25 11:09:25 UTC
Thanks, committed:

 2006-04-25  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Josef Zlomek  <josef dot zlomek at itonis dot tv>

        * gst/matroska/matroska-mux.c:
        (gst_matroska_mux_create_buffer_header),
        (gst_matroska_mux_write_data):
          Fix timestamping of B-frames, use signed integers, do
          some rounding (#339678).

(minor change: used (gint64) for cast rather than (int64_t))