Commit fc30337a authored by Michael Smith's avatar Michael Smith
Browse files

gst/audioconvert/audioconvert.c: More correct float->int conversion.

Original commit message from CVS:
* gst/audioconvert/audioconvert.c: (float):
More correct float->int conversion.
parent 9bfe8602
2006-06-02 Michael Smith <msmith@fluendo.com>
* gst/audioconvert/audioconvert.c: (float):
More correct float->int conversion.
2006-06-02 Michael Smith <msmith@fluendo.com>
 
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_perform_seek):
......
......@@ -58,10 +58,10 @@ MAKE_UNPACK_FUNC_NAME (float) (gpointer src, gint32 * dst,
gint scale, gint count)
{
gfloat *p = (gfloat *) src;
gint64 temp;
gdouble temp;
for (; count; count--) {
temp = *p++ * 2147483647.0f;
temp = (*p++ * 2147483647.0) + 0.5;
*dst++ = (gint32) CLAMP (temp, G_MININT32, G_MAXINT32);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment