Fix file type error
Additionally changed compiler optimisation back to O3 and temporarily use only a single buffer with flac decoding. Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
@@ -134,6 +134,9 @@ int main(int argc, char **argv)
|
||||
if(closedir(dp) != 0)
|
||||
err_print("Closing directory failed.");
|
||||
|
||||
/* TODO: There is an issue with Unicode files here.
|
||||
* Playing a flac file then a file with a name containing the
|
||||
* character 'é' will cause the asprint to not work properly. */
|
||||
if(asprintf(&file, "%s%s", AUDIO_FOLDER, ep->d_name) == -1)
|
||||
{
|
||||
err_print("Constructing file name failed.");
|
||||
@@ -183,9 +186,10 @@ int getFileType(const char *file)
|
||||
int fileSig = 0;
|
||||
enum file_types file_type = FILE_TYPE_ERROR;
|
||||
|
||||
if(file == NULL)
|
||||
if(ftest == NULL)
|
||||
{
|
||||
err_print("Opening file failed.");
|
||||
printf("file: %s\n", file);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user