Skip to content

Commit

Permalink
Error out when libmodplug is used
Browse files Browse the repository at this point in the history
  • Loading branch information
myrsloik committed Apr 13, 2024
1 parent b166edf commit 8dbebd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/audiosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ void LWAudioDecoder::OpenFile(const std::filesystem::path &SourceFile, int Track
throw BestSourceException("Couldn't find stream information");
}

if (!strcmp(FormatContext->iformat->name, "libmodplug"))
throw BestSourceException("Opening files with libmodplug demuxer is not supported");

if (TrackNumber < 0) {
for (int i = 0; i < static_cast<int>(FormatContext->nb_streams); i++) {
if (FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
Expand Down

0 comments on commit 8dbebd1

Please sign in to comment.