[gstreamer-bugs] [Bug 604352] [rganalysis] miscomputes timestamps
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Sun Dec 13 07:48:29 PST 2009
https://bugzilla.gnome.org/show_bug.cgi?id=604352
GStreamer | gst-plugins-good | git
--- Comment #3 from Branko Čibej <brane at xbc.nu> 2009-12-13 15:48:25 UTC ---
Here's the updated patch:
--- gstreamer/good/gst/replaygain/rganalysis.c (original)
+++ gstreamer/good/gst/replaygain/rganalysis.c (fixed)
@@ -710,9 +710,11 @@
(gint) G_N_ELEMENTS (ctx->track.histogram) - 1);
/* Compute the per-window gain */
const gdouble gain = PINK_REF - (gdouble) ival / STEPS_PER_DB;
- const GstClockTime timestamp = (ctx->buffer_timestamp
- + ctx->buffer_n_samples_done * GST_SECOND / ctx->sample_rate
- - RMS_WINDOW_MSECS * GST_MSECOND);
+ const GstClockTime timestamp = ctx->buffer_timestamp
+ + gst_util_uint64_scale_int_ceil(GST_SECOND,
+ ctx->buffer_n_samples_done,
+ ctx->sample_rate)
+ - RMS_WINDOW_MSECS * GST_MSECOND;
ctx->post_message (ctx->analysis, timestamp,
RMS_WINDOW_MSECS * GST_MSECOND, -gain);
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list