summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--gst-libs/gst/resample/resample.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e3dd7dd..f3ad1aab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-03-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * gst-libs/gst/resample/resample.c: (gst_resample_scale):
+ * gst/audioscale/gstaudioscale.c: (gst_audioscale_chain):
+ Stop sucking.
+
+2005-03-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_init),
(gst_auto_audio_sink_detect):
* gst/autodetect/gstautoaudiosink.h:
diff --git a/gst-libs/gst/resample/resample.c b/gst-libs/gst/resample/resample.c
index c73b1186..5e0a7b43 100644
--- a/gst-libs/gst/resample/resample.c
+++ b/gst-libs/gst/resample/resample.c
@@ -179,6 +179,8 @@ gst_resample_scale (gst_resample_t * r, void *i_buf, unsigned int i_size)
r->i_end = r->i_start + r->i_inc * r->i_samples;
r->o_samples = floor (r->i_end - r->halftaps * r->i_inc);
+ if (r->o_samples < 0)
+ r->o_samples = 0;
o_size = r->o_samples * r->channels * 2;
r->o_buf = r->get_buffer (r->priv, o_size);
@@ -268,8 +270,7 @@ gst_resample_nearest_s16 (gst_resample_t * r)
SCALE_LOOP (o_ptr[0] = i_ptr[0], 1);
break;
case 2:
- SCALE_LOOP (o_ptr[0] = i_ptr[0];
- o_ptr[1] = i_ptr[1], 2);
+ SCALE_LOOP (o_ptr[0] = i_ptr[0]; o_ptr[1] = i_ptr[1], 2);
break;
default:
{
@@ -630,8 +631,7 @@ gst_resample_nearest_float (gst_resample_t * r)
SCALE_LOOP (o_ptr[0] = i_ptr[0], 1);
break;
case 2:
- SCALE_LOOP (o_ptr[0] = i_ptr[0];
- o_ptr[1] = i_ptr[1], 2);
+ SCALE_LOOP (o_ptr[0] = i_ptr[0]; o_ptr[1] = i_ptr[1], 2);
break;
default:
{