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:
Zavadovsky Yan 2015-02-21 22:59:39 +03:00
parent 6ce87bd477
commit 2c1aff1ab9

View File

@ -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);