proper close order on error - release

This commit is contained in:
Philippe G
2020-07-10 23:38:38 -07:00
parent ba75350455
commit cf81182dae
3 changed files with 3 additions and 3 deletions

View File

@@ -168,8 +168,8 @@ struct raop_ctx_s *raop_create(struct in_addr host, char *name,
addr.sin_port = htons(ctx->port);
#endif
if (bind(ctx->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0 || listen(ctx->sock, 1)) {
LOG_ERROR("Cannot bind or listen RTSP listener: %s", strerror(errno));
LOG_ERROR("Cannot bind or listen RTSP listener: %s", strerror(errno));
closesocket(ctx->sock);
free(ctx);
return NULL;

View File

@@ -252,7 +252,7 @@ static void flac_open(u8_t sample_size, u8_t sample_rate, u8_t channels, u8_t en
}
if ( f->container == 'o' ) {
LOG_DEBUG("ogg/flac container - using init_ogg_stream");
LOG_INFO("ogg/flac container - using init_ogg_stream");
FLAC(f, stream_decoder_init_ogg_stream, f->decoder, &read_cb, NULL, NULL, NULL, NULL, &write_cb, NULL, &error_cb, NULL);
} else {
FLAC(f, stream_decoder_init_stream, f->decoder, &read_cb, NULL, NULL, NULL, NULL, &write_cb, NULL, &error_cb, NULL);

View File

@@ -364,7 +364,7 @@ static decode_state helixaac_decode(void) {
if (a->type == '2') {
// adts stream - seek for header
long n = AACFindSyncWord(streambuf->readp, bytes_wrap);
long n = HAAC(a, FindSyncWord, streambuf->readp, bytes_wrap);
LOG_DEBUG("Sync search in %d bytes %d", bytes_wrap, n);