diff options
Diffstat (limited to '')
-rw-r--r-- | src/audioOutput_shout.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/audioOutput_shout.c b/src/audioOutput_shout.c index f27c56e4f..0de8f4f57 100644 --- a/src/audioOutput_shout.c +++ b/src/audioOutput_shout.c @@ -61,7 +61,7 @@ typedef struct _ShoutData { AudioFormat inAudioFormat; char * convBuffer; - long convBufferLen; + size_t convBufferLen; /* shoud we convert the audio to a different format? */ int audioFormatConvert; @@ -87,6 +87,7 @@ static ShoutData * newShoutData() { static void freeShoutData(ShoutData * sd) { if(sd->shoutConn) shout_free(sd->shoutConn); if(sd->tag) freeMpdTag(sd->tag); + if(sd->convBuffer) free(sd->convBuffer); free(sd); } @@ -113,6 +114,10 @@ static int shout_initDriver(AudioOutput * audioOutput, ConfigParam * param) { sd = newShoutData(); + if(shoutInitCount == 0) shout_init(); + + shoutInitCount++; + checkBlockParam("host"); host = blockParam->value; @@ -228,10 +233,6 @@ static int shout_initDriver(AudioOutput * audioOutput, ConfigParam * param) { audioOutput->data = sd; - if(shoutInitCount == 0) shout_init(); - - shoutInitCount++; - return 0; } @@ -423,7 +424,7 @@ static int shout_openDevice(AudioOutput * audioOutput, static void shout_convertAudioFormat(ShoutData * sd, char ** chunkArgPtr, int * sizeArgPtr) { - int size = pcm_sizeOfOutputBufferForAudioFormatConversion( + size_t size = pcm_sizeOfOutputBufferForAudioFormatConversion( &(sd->inAudioFormat), *sizeArgPtr, &(sd->outAudioFormat)); |