Skip to content

Commit

Permalink
coreaudio, oss, sndio: minor safeguards.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Apr 1, 2024
1 parent 22b8126 commit c33e10d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/player/out_coreaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ static void close_coreaudio_output(void)
AudioUnitUninitialize(au);
AudioComponentInstanceDispose(au);
free(buffer);
buffer = NULL;
}

static void pause_coreaudio_output(void)
Expand All @@ -308,5 +309,4 @@ audiodrv_info audiodrv_coreaudio = {
pause_coreaudio_output,
resume_coreaudio_output
};

#endif /* AUDIODRV_COREAUDIO */
2 changes: 1 addition & 1 deletion src/player/out_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define DEFAULT_FRAGSIZE 14
#define DEFAULT_NUMFRAGS 16

static int audio_fd;
static int audio_fd = -1;

static void close_oss_output(void);

Expand Down
1 change: 1 addition & 0 deletions src/player/out_sndio.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ static int write_sndio_output(void *buf, int len)

static void close_sndio_output(void)
{
if (!hdl) return;
sio_close(hdl);
hdl = NULL;
}
Expand Down

0 comments on commit c33e10d

Please sign in to comment.