diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-18 21:09:59 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-18 21:09:59 +0000 |
commit | a3c259974ea93b160112a9c61101e667664443c3 (patch) | |
tree | c87dc7379d846fa44dfc2b17b07499a6d76b4d1e /audio | |
parent | 69db0ac75a07a8a8957bbe72ab93a6e66ecee067 (diff) | |
download | hqemu-a3c259974ea93b160112a9c61101e667664443c3.zip hqemu-a3c259974ea93b160112a9c61101e667664443c3.tar.gz |
audio capture fixes (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2061 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio.c | 5 | ||||
-rw-r--r-- | audio/wavcapture.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/audio/audio.c b/audio/audio.c index 9be77c0..8e7af1a 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1845,16 +1845,21 @@ void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque) if (!cap->cb_head.lh_first) { SWVoiceOut *sw = cap->hw.sw_head.lh_first, *sw1; + while (sw) { + SWVoiceCap *sc = (SWVoiceCap *) sw; #ifdef DEBUG_CAPTURE dolog ("freeing %s\n", sw->name); #endif + sw1 = sw->entries.le_next; if (sw->rate) { st_rate_stop (sw->rate); sw->rate = NULL; } LIST_REMOVE (sw, entries); + LIST_REMOVE (sc, entries); + qemu_free (sc); sw = sw1; } LIST_REMOVE (cap, entries); diff --git a/audio/wavcapture.c b/audio/wavcapture.c index 748b580..f55d59c 100644 --- a/audio/wavcapture.c +++ b/audio/wavcapture.c @@ -121,7 +121,8 @@ int wav_start_capture (CaptureState *s, const char *path, int freq, wav = qemu_mallocz (sizeof (*wav)); if (!wav) { - AUD_log ("wav", "Could not allocate memory (%zu bytes)", sizeof (*wav)); + term_printf ("Could not allocate memory for wav capture (%zu bytes)", + sizeof (*wav)); return -1; } |