diff options
author | Robin Gareus <robin@gareus.org> | 2019-12-07 15:38:09 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-12-07 15:38:55 +0100 |
commit | 642bfc4c9a4b4d9db8c646d6618746894aee02fa (patch) | |
tree | 3fc41013bab33fa70794934af245613fc9c0eb09 /libs/ardour/sndfilesource.cc | |
parent | c7c40f6f3df85114a59092efa8ad879b3e90d822 (diff) |
Do not allow to embed ogg/vorbis files, require import
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index f878796198..918e695f10 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -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); |