channels/rdpsnd: fix memory leak
Pointer to sound data chunk must be put into queue otherwise bqPlayerCallback() will have nothing to free and memory will leak.
This commit is contained in:
parent
6ce87bd477
commit
2c1aff1ab9
@ -298,6 +298,7 @@ int android_AudioOut(OPENSL_STREAM *p, const short *buffer,int size)
|
||||
|
||||
void *data = calloc(size, sizeof(short));
|
||||
memcpy(data, buffer, size * sizeof(short));
|
||||
Queue_Enqueue(p->queue, data);
|
||||
(*p->bqPlayerBufferQueue)->Enqueue(p->bqPlayerBufferQueue,
|
||||
data, sizeof(short) * size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user