mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
[scan] Ignore 0-byte files in library so ffmpeg 3.2 doesn't crash
This commit is contained in:
parent
a5f75dab36
commit
65d578f8c8
@ -400,6 +400,12 @@ scan_metadata_ffmpeg(struct media_file_info *mfi, const char *file)
|
||||
|
||||
av_dict_set(&options, "icy", "1", 0);
|
||||
}
|
||||
else if (mfi->data_kind == DATA_KIND_FILE && mfi->file_size == 0)
|
||||
{
|
||||
// a 0-byte mp3 will make ffmpeg die with arithmetic exception (with 3.2.15-0+deb9u4)
|
||||
free(path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = avformat_open_input(&ctx, path, NULL, &options);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user