Skip to content

Commit

Permalink
src/player/mpvadapter: fix files not playing on mpv v0.38.0
Browse files Browse the repository at this point in the history
Something changed so mpv v0.38.0 won't accept loadfile commands if the
option string is an empty string. This is annoying because it completely
breaks Memento with relatively little warning since this was a change
made in the last couple weeks before release. This fixes the issue by
checking if the option string is empty and using NULL in that case.
  • Loading branch information
ripose-jp committed Apr 20, 2024
1 parent 64e4bb9 commit 02ce0bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/player/mpvadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ void MpvAdapter::open(const QString &file,
"loadfile",
filename,
append ? "append-play" : "replace",
opts,
opts.isEmpty() ? NULL : opts.data(),
NULL
};

Expand Down Expand Up @@ -922,7 +922,7 @@ QString MpvAdapter::tempAudioClip(
"loadfile",
input,
"replace",
optionCmd,
optionCmd.isEmpty() ? NULL : optionCmd.data(),
NULL
};

Expand Down

0 comments on commit 02ce0bd

Please sign in to comment.