diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-03-01 17:32:46 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-03-01 17:32:46 +0000 |
commit | 65c700b9dd2dc86ebe9a02669ea349d7d8ad3aad (patch) | |
tree | 59fa3f96584e2c61e7db0578d27cbae43e123a66 /gst-libs/gst | |
parent | fff798e3683d2e1fd02436ad9909ab8f02789d85 (diff) | |
download | gst-plugins-bad-65c700b9dd2dc86ebe9a02669ea349d7d8ad3aad.tar.gz gst-plugins-bad-65c700b9dd2dc86ebe9a02669ea349d7d8ad3aad.tar.bz2 gst-plugins-bad-65c700b9dd2dc86ebe9a02669ea349d7d8ad3aad.zip |
gst/: Stop sucking.
Original commit message from CVS:
* gst-libs/gst/resample/resample.c: (gst_resample_scale):
* gst/audioscale/gstaudioscale.c: (gst_audioscale_chain):
Stop sucking.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/resample/resample.c | 8 |
1 files changed, 4 insertions, 4 deletions
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: { |