mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
libspark/audio_mixer: don't try to free() stack-allocated snd_mixer_selem_id
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include <audio_mixer.h>
|
||||
|
||||
mixerVolume::mixerVolume(const char *name, const char *card, long volume) {
|
||||
sid = NULL;
|
||||
snd_mixer_selem_id_t *sid = NULL;
|
||||
elem = NULL;
|
||||
handle = NULL;
|
||||
min = 0;
|
||||
@@ -58,8 +58,6 @@ mixerVolume::~mixerVolume()
|
||||
{
|
||||
if (handle)
|
||||
snd_mixer_close(handle);
|
||||
if (sid)
|
||||
snd_mixer_selem_id_free(sid);
|
||||
}
|
||||
|
||||
bool mixerVolume::setVolume(long volume) {
|
||||
|
@@ -27,7 +27,6 @@ class mixerVolume
|
||||
long min, max;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_elem_t* elem;
|
||||
snd_mixer_selem_id_t *sid;
|
||||
public:
|
||||
mixerVolume(const char *selem_name, const char *Card, long volume = -1);
|
||||
~mixerVolume(void);
|
||||
|
Reference in New Issue
Block a user