[gstreamer-bugs] [Bug 604352] New: rganalisys miscomputes timestamps
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Dec 11 02:13:56 PST 2009
https://bugzilla.gnome.org/show_bug.cgi?id=604352
GStreamer | gst-plugins-good | git
Summary: rganalisys miscomputes timestamps
Classification: Desktop
Product: GStreamer
Version: git
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: brane at xbc.nu
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME target: ---
GNOME version: ---
When calculating the data for the audio gain messages, rganalysis does not
properly round up the timestamp. The result is that for messages generated at
the beginning of a stream, the calculated timestamp can be negative.
The following fix works for me:
--- gst/replaygain/rganalysis.c (original)
+++ gst/replaygain/rganalysis.c (fixed)
@@ -711,7 +711,8 @@
/* 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
+ + (ctx->buffer_n_samples_done * GST_SECOND + ctx->sample_rate - 1)
+ / ctx->sample_rate
- RMS_WINDOW_MSECS * GST_MSECOND);
--
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