Changeset e83c895


Ignore:
Timestamp:
May 17, 2006, 11:12:44 AM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
08f6688
Parents:
5cc94db
Message:

strange workaround to fix segfaults on some wav files
strange workaround to fix segfaults on some wav files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ext/sndfileio.c

    r5cc94db re83c895  
    4343        SF_INFO sfinfo;
    4444        AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo));
    45 
    46         if (! (f->handle = sf_open (outputname, SFM_READ, &sfinfo))) {
     45        sfinfo.format = 0;
     46
     47        f->handle = sf_open (outputname, SFM_READ, &sfinfo);
     48
     49        if (f->handle == NULL) {
    4750                AUBIO_ERR("Unable to open input file %s.\n", outputname);
    4851                AUBIO_ERR("%s\n",sf_strerror (NULL)); /* libsndfile err msg */
     
    6770int aubio_sndfile_open_wo(aubio_sndfile_t * f, const char* inputname) {
    6871        SF_INFO sfinfo;
    69         memset (&sfinfo, 0, sizeof (sfinfo));
     72        AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo));
    7073
    7174        /* define file output spec */
Note: See TracChangeset for help on using the changeset viewer.