* Use an asprintf wrapper, to report errors and NULLify the result.

This commit is contained in:
Justin Maggard
2012-03-14 17:57:21 +00:00
parent c9d979886b
commit cabbd0b1de
10 changed files with 77 additions and 53 deletions

View File

@ -42,8 +42,8 @@ _get_pcmfileinfo(char *filename, struct song_metadata *psong)
psong->song_length = (sec * 1000) + ms;
psong->lossless = 1;
asprintf(&(psong->mime), "audio/L16;rate=%d;channels=%d", psong->samplerate, psong->channels);
asprintf(&(psong->dlna_pn), "LPCM");
xasprintf(&(psong->mime), "audio/L16;rate=%d;channels=%d", psong->samplerate, psong->channels);
xasprintf(&(psong->dlna_pn), "LPCM");
return 0;
}