load_mp3.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 17 Jun 2015 00:11:41 -0700
changeset 705 fe757163b8f7
parent 662 fd5af79fac03
child 710 1aca2b6d570f
permissions -rw-r--r--
Fixed bug 3018 - Loading MIDI music using FluidSynth leaks memory.

Philipp Wiesemann

There is a memory leak in fluidsynth.c and fluidsynth_loadsong_RW_internal(). The allocated temporary buffer is not deleted if fluid_player_add_mem() returns FLUID_OK.
slouken@662
     1
/*
slouken@662
     2
  SDL_mixer:  An audio mixer library based on the SDL library
slouken@662
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@662
     4
slouken@662
     5
  This software is provided 'as-is', without any express or implied
slouken@662
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@662
     7
  arising from the use of this software.
slouken@662
     8
slouken@662
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@662
    10
  including commercial applications, and to alter it and redistribute it
slouken@662
    11
  freely, subject to the following restrictions:
slouken@662
    12
slouken@662
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@662
    14
     claim that you wrote the original software. If you use this software
slouken@662
    15
     in a product, an acknowledgment in the product documentation would be
slouken@662
    16
     appreciated but is not required.
slouken@662
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@662
    18
     misrepresented as being the original software.
slouken@662
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@662
    20
slouken@662
    21
  This is the source needed to decode an MP3 into a waveform.
slouken@662
    22
*/
slouken@662
    23
slouken@662
    24
/* $Id$ */
slouken@662
    25
slouken@662
    26
#ifdef MP3_MUSIC
slouken@662
    27
/* Don't call this directly; use Mix_LoadWAV_RW() for now. */
slouken@662
    28
SDL_AudioSpec *Mix_LoadMP3_RW (SDL_RWops *src, int freesrc,
slouken@662
    29
        SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
slouken@662
    30
#endif