GNOME Bugzilla – Bug 339678
[matroskamux] wrong timestamps of B-frames
Last modified: 2006-04-25 11:31:59 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).
Created attachment 64263 [details] [review] Signed relative timestamp
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))