* Use an asprintf wrapper, to report errors and NULLify the result.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user