tools: dump sndfile loginfo on error when verbose

This commit is contained in:
Wim Taymans 2025-08-26 10:59:11 +02:00
parent 28ed09b155
commit 7359491b97

View file

@ -1631,6 +1631,11 @@ static int setup_sndfile(struct data *data)
if (!data->file) {
fprintf(stderr, "sndfile: failed to open audio file \"%s\": %s\n",
data->filename, sf_strerror(NULL));
if (data->verbose) {
char loginfo[4096];
if (sf_command(NULL, SFC_GET_LOG_INFO, &loginfo, sizeof(loginfo)) > 0)
fprintf(stderr, "%s\n", loginfo);
}
return -EIO;
}