gst/audioconvert/gstchannelmix.c: more overwriting protection due to modifying channels one by one instead of all at ...
Original commit message from CVS: * gst/audioconvert/gstchannelmix.c: (gst_audio_convert_mix): more overwriting protection due to modifying channels one by one instead of all at once
This commit is contained in:
parent
836ea71ea1
commit
05103c18ca
@ -1,3 +1,9 @@
|
|||||||
|
2004-11-28 Benjamin Otte <otte@gnome.org>
|
||||||
|
|
||||||
|
* gst/audioconvert/gstchannelmix.c: (gst_audio_convert_mix):
|
||||||
|
more overwriting protection due to modifying channels one by one
|
||||||
|
instead of all at once
|
||||||
|
|
||||||
2004-11-28 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2004-11-28 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* gst/audioconvert/gstchannelmix.c:
|
* gst/audioconvert/gstchannelmix.c:
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <string.h>
|
||||||
#include <gst/audio/multichannel.h>
|
#include <gst/audio/multichannel.h>
|
||||||
|
|
||||||
#include "gstchannelmix.h"
|
#include "gstchannelmix.h"
|
||||||
@ -532,6 +533,7 @@ gst_audio_convert_mix (GstAudioConvert * this,
|
|||||||
{
|
{
|
||||||
gint in, out, n;
|
gint in, out, n;
|
||||||
gint64 res;
|
gint64 res;
|
||||||
|
gint32 tmp[this->srccaps.channels];
|
||||||
gboolean backwards = this->srccaps.channels > this->sinkcaps.channels;
|
gboolean backwards = this->srccaps.channels > this->sinkcaps.channels;
|
||||||
|
|
||||||
/* FIXME: use liboil here? */
|
/* FIXME: use liboil here? */
|
||||||
@ -550,9 +552,9 @@ gst_audio_convert_mix (GstAudioConvert * this,
|
|||||||
res = G_MININT32;
|
res = G_MININT32;
|
||||||
else if (res > G_MAXINT32)
|
else if (res > G_MAXINT32)
|
||||||
res = G_MAXINT32;
|
res = G_MAXINT32;
|
||||||
|
tmp[out] = res;
|
||||||
/* store */
|
|
||||||
out_data[n * this->srccaps.channels + out] = res;
|
|
||||||
}
|
}
|
||||||
|
memcpy (&out_data[n * this->srccaps.channels], tmp,
|
||||||
|
sizeof (gint32) * this->srccaps.channels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user