Do not allow to embed ogg/vorbis files, require import

This commit is contained in:
Robin Gareus
2019-12-07 15:38:09 +01:00
parent c7c40f6f3d
commit 642bfc4c9a

View File

@@ -1105,7 +1105,11 @@ SndFileSource::get_soundfile_info (const string& path, SoundFileInfo& info, stri
}
info.timecode = binfo.load_from_file (sf) ? binfo.get_time_reference() : 0;
info.seekable = true;
/* Mark Ogg/Vorbis files as not seekable, require conversion on import */
int const type = sf_info.format & SF_FORMAT_TYPEMASK;
int const sub = sf_info.format & SF_FORMAT_SUBMASK;
info.seekable = (type != SF_FORMAT_OGG && sub != SF_FORMAT_VORBIS);
sf_close (sf);