diff -r 9b2c3c7a1a9c -r 567bb019e3e3 gst_plugins_base/gst/audioconvert/audioconvert.c --- a/gst_plugins_base/gst/audioconvert/audioconvert.c Wed Mar 31 22:03:18 2010 +0300 +++ b/gst_plugins_base/gst/audioconvert/audioconvert.c Tue Aug 31 15:30:33 2010 +0300 @@ -66,7 +66,6 @@ } \ } - /* unpack from float to float 64 (double) */ #define MAKE_UNPACK_FUNC_FF(name, type, FUNC) \ static void \ @@ -418,7 +417,8 @@ gboolean audio_convert_prepare_context (AudioConvertCtx * ctx, AudioConvertFmt * in, - AudioConvertFmt * out, DitherType dither, NoiseShapingType ns) + AudioConvertFmt * out, GstAudioConvertDithering dither, + GstAudioConvertNoiseShaping ns) { gint idx_in, idx_out; @@ -429,6 +429,9 @@ /* first clean the existing context */ audio_convert_clean_context (ctx); + g_return_val_if_fail (in->unpositioned_layout == out->unpositioned_layout, + FALSE); + ctx->in = *in; ctx->out = *out; @@ -534,9 +537,9 @@ audio_convert_convert (AudioConvertCtx * ctx, gpointer src, gpointer dst, gint samples, gboolean src_writable) { - gint insize, outsize, size; + guint insize, outsize, size; gpointer outbuf, tmpbuf; - gint intemp = 0, outtemp = 0, biggest; + guint intemp = 0, outtemp = 0, biggest; g_return_val_if_fail (ctx != NULL, FALSE); g_return_val_if_fail (src != NULL, FALSE); @@ -554,9 +557,9 @@ : sizeof (gint32); if (!ctx->in_default) - intemp = insize * size * 8 / ctx->in.width; + intemp = gst_util_uint64_scale (insize, size * 8, ctx->in.width); if (!ctx->mix_passthrough || !ctx->out_default) - outtemp = outsize * size * 8 / ctx->out.width; + outtemp = gst_util_uint64_scale (outsize, size * 8, ctx->out.width); biggest = MAX (intemp, outtemp); /* see if one of the buffers can be used as temp */