Backed out changeset a9bfe66b235c (bug 1264199)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 21 Apr 2016 16:31:52 +0200
changeset 332169 6ebd803604bb88f87ce6d2fb0ef0e67d9efec324
parent 332168 0c845a225f1a913372969fb3bf3c405bf00e0e93
child 332170 95384829747b0653b8036ec292c0dab0df637e19
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1264199
milestone48.0a1
backs outa9bfe66b235c0936cb34f53d24aee08d3814bdfd
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset a9bfe66b235c (bug 1264199)
media/libspeex_resampler/handle-memory-error.patch
media/libspeex_resampler/src/resample.c
media/libspeex_resampler/update.sh
deleted file mode 100644
--- a/media/libspeex_resampler/handle-memory-error.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/media/libspeex_resampler/src/resample.c b/media/libspeex_resampler/src/resample.c
-index 83ad119..a3859e3 100644
---- a/media/libspeex_resampler/src/resample.c
-+++ b/media/libspeex_resampler/src/resample.c
-@@ -811,6 +811,12 @@ EXPORT SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
-       return NULL;
-    }
-    st = (SpeexResamplerState *)speex_alloc(sizeof(SpeexResamplerState));
-+   if (!st)
-+   {
-+      if (err)
-+         *err = RESAMPLER_ERR_ALLOC_FAILED;
-+      return NULL;
-+   }
-    st->initialised = 0;
-    st->started = 0;
-    st->in_rate = 0;
-@@ -832,9 +838,12 @@ EXPORT SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
-    st->buffer_size = 160;
-    
-    /* Per channel data */
--   st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t));
--   st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
--   st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
-+   if (!(st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t))))
-+      goto fail;
-+   if (!(st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t))))
-+      goto fail;
-+   if (!(st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t))))
-+      goto fail;
-    for (i=0;i<nb_channels;i++)
-    {
-       st->last_sample[i] = 0;
-@@ -857,6 +866,12 @@ EXPORT SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
-       *err = filter_err;
- 
-    return st;
-+
-+fail:
-+   if (err)
-+      *err = RESAMPLER_ERR_ALLOC_FAILED;
-+   speex_resampler_destroy(st);
-+   return NULL;
- }
- 
- EXPORT void speex_resampler_destroy(SpeexResamplerState *st)
--- a/media/libspeex_resampler/src/resample.c
+++ b/media/libspeex_resampler/src/resample.c
@@ -806,22 +806,16 @@ EXPORT SpeexResamplerState *speex_resamp
 
    if (quality > 10 || quality < 0)
    {
       if (err)
          *err = RESAMPLER_ERR_INVALID_ARG;
       return NULL;
    }
    st = (SpeexResamplerState *)speex_alloc(sizeof(SpeexResamplerState));
-   if (!st)
-   {
-      if (err)
-         *err = RESAMPLER_ERR_ALLOC_FAILED;
-      return NULL;
-   }
    st->initialised = 0;
    st->started = 0;
    st->in_rate = 0;
    st->out_rate = 0;
    st->num_rate = 0;
    st->den_rate = 0;
    st->quality = -1;
    st->sinc_table_length = 0;
@@ -833,22 +827,19 @@ EXPORT SpeexResamplerState *speex_resamp
    st->cutoff = 1.f;
    st->nb_channels = nb_channels;
    st->in_stride = 1;
    st->out_stride = 1;
    
    st->buffer_size = 160;
    
    /* Per channel data */
-   if (!(st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t))))
-      goto fail;
-   if (!(st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t))))
-      goto fail;
-   if (!(st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t))))
-      goto fail;
+   st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t));
+   st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
+   st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
    for (i=0;i<nb_channels;i++)
    {
       st->last_sample[i] = 0;
       st->magic_samples[i] = 0;
       st->samp_frac_num[i] = 0;
    }
 
    speex_resampler_set_quality(st, quality);
@@ -861,22 +852,16 @@ EXPORT SpeexResamplerState *speex_resamp
    } else {
       speex_resampler_destroy(st);
       st = NULL;
    }
    if (err)
       *err = filter_err;
 
    return st;
-
-fail:
-   if (err)
-      *err = RESAMPLER_ERR_ALLOC_FAILED;
-   speex_resampler_destroy(st);
-   return NULL;
 }
 
 EXPORT void speex_resampler_destroy(SpeexResamplerState *st)
 {
    speex_free(st->mem);
    speex_free(st->sinc_table);
    speex_free(st->last_sample);
    speex_free(st->magic_samples);
--- a/media/libspeex_resampler/update.sh
+++ b/media/libspeex_resampler/update.sh
@@ -20,9 +20,8 @@ cp $1/AUTHORS .
 cp $1/COPYING .
 
 # apply outstanding local patches
 patch -p3 < outside-speex.patch
 patch -p3 < simd-detect-runtime.patch
 patch -p3 < set-skip-frac.patch
 patch -p3 < hugemem.patch
 patch -p3 < remove-empty-asm-clobber.patch
-patch -p3 < handle-memory-error.patch