Testing mp3 files with error protection enabled
Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
@@ -47,14 +47,14 @@ int initMp3(const char* file)
|
||||
|
||||
if((mh = mpg123_new(NULL, &err)) == NULL)
|
||||
{
|
||||
//printf("Error: %s\n", mpg123_plain_strerror(err));
|
||||
printf("Error: %s\n", mpg123_plain_strerror(err));
|
||||
return err;
|
||||
}
|
||||
|
||||
if(mpg123_open(mh, file) != MPG123_OK ||
|
||||
mpg123_getformat(mh, (long *) &rate, (int *) &channels, &encoding) != MPG123_OK)
|
||||
{
|
||||
//printf("Trouble with mpg123: %s\n", mpg123_strerror(mh));
|
||||
printf("Trouble with mpg123: %s\n", mpg123_strerror(mh));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user