aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/outputBuffer.c6
-rw-r--r--src/outputBuffer.h2
-rw-r--r--src/playerData.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index 8e2780eb2..de649e0c7 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -36,6 +36,12 @@ void initOutputBuffer(OutputBuffer * cb, unsigned int size)
cb->currentChunk = -1;
}
+void output_buffer_free(OutputBuffer * cb)
+{
+ assert(cb->chunks != NULL);
+ free(cb->chunks);
+}
+
void clearOutputBuffer(OutputBuffer * cb)
{
cb->end = cb->begin;
diff --git a/src/outputBuffer.h b/src/outputBuffer.h
index 6ca073836..9f5a996bb 100644
--- a/src/outputBuffer.h
+++ b/src/outputBuffer.h
@@ -62,6 +62,8 @@ typedef struct _OutputBuffer {
void initOutputBuffer(OutputBuffer * cb, unsigned int size);
+void output_buffer_free(OutputBuffer * cb);
+
void clearOutputBuffer(OutputBuffer * cb);
void flushOutputBuffer(OutputBuffer * cb);
diff --git a/src/playerData.c b/src/playerData.c
index 91a7ef661..6cc98ccc6 100644
--- a/src/playerData.c
+++ b/src/playerData.c
@@ -116,5 +116,6 @@ void freePlayerData(void)
* access playerData_pd and we need to keep it available for them */
waitpid(-1, NULL, 0);
+ output_buffer_free(&playerData_pd.buffer);
free(playerData_pd.audioDeviceStates);
}