mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
memory leak in AirPlay
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
#define RTP_SYNC (0x01)
|
||||
#define NTP_SYNC (0x02)
|
||||
|
||||
#define RESEND_TO 200
|
||||
#define RESEND_TO 200
|
||||
|
||||
enum { DATA = 0, CONTROL, TIMING };
|
||||
|
||||
@@ -159,7 +159,7 @@ static int seq_order(seq_t a, seq_t b);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static alac_file* alac_init(int fmtp[32]) {
|
||||
alac_file *alac;
|
||||
alac_file *alac;
|
||||
int sample_size = fmtp[3];
|
||||
|
||||
if (sample_size != 16) {
|
||||
@@ -257,7 +257,7 @@ rtp_resp_t rtp_init(struct in_addr host, int latency, char *aeskey, char *aesiv,
|
||||
|
||||
// create http port and start listening
|
||||
resp.cport = ctx->rtp_sockets[CONTROL].lport;
|
||||
resp.tport = ctx->rtp_sockets[TIMING].lport;
|
||||
resp.tport = ctx->rtp_sockets[TIMING].lport;
|
||||
resp.aport = ctx->rtp_sockets[DATA].lport;
|
||||
|
||||
if (rc) {
|
||||
@@ -291,13 +291,14 @@ void rtp_end(rtp_t *ctx)
|
||||
#else
|
||||
ctx->joiner = xTaskGetCurrentTaskHandle();
|
||||
xTaskNotifyWait(0, 0, NULL, portMAX_DELAY);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
for (i = 0; i < 3; i++) closesocket(ctx->rtp_sockets[i].sock);
|
||||
|
||||
|
||||
delete_alac(ctx->alac_codec);
|
||||
if (ctx->decrypt_buf) free(ctx->decrypt_buf);
|
||||
|
||||
pthread_mutex_destroy(&ctx->ab_mutex);
|
||||
buffer_release(ctx->audio_buffer);
|
||||
|
||||
free(ctx);
|
||||
@@ -374,7 +375,7 @@ static void alac_decode(rtp_t *ctx, s16_t *dest, char *buf, int len, int *outsiz
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void alac_decode(rtp_t *ctx, s16_t *dest, char *buf, int len, int *outsize) {
|
||||
unsigned char iv[16];
|
||||
int aeslen;
|
||||
int aeslen;
|
||||
assert(len<=MAX_PACKET);
|
||||
|
||||
if (ctx->decrypt) {
|
||||
|
||||
Reference in New Issue
Block a user