Testing mp3 files with error protection enabled

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
Mahyar Koshkouei
2017-01-13 22:01:06 +00:00
parent e573b497eb
commit bc2d8aae85
3 changed files with 6 additions and 4 deletions

View File

@@ -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;
}