Commit 5fab107f authored by Max Kellermann's avatar Max Kellermann

lib/nfs/FileReader: use the thread-safe InjectEvent

.. instead of DeferEvent, which is not thread-safe. This caused various playback problems, which was initially caused by the DeferEvent/InjectEvent split in commit 774b4313 Closes https://github.com/MusicPlayerDaemon/MPD/issues/1298
parent f31920e0
ver 0.23.2 (not yet released)
* input
- nfs: fix playback bug
* output
- pipewire: send artist and title to PipeWire
* neighbor
......
......@@ -22,7 +22,7 @@
#include "Lease.hxx"
#include "Callback.hxx"
#include "event/DeferEvent.hxx"
#include "event/InjectEvent.hxx"
#include "util/Compiler.h"
#include <cstddef>
......@@ -63,7 +63,10 @@ class NfsFileReader : NfsLease, NfsCallback {
nfsfh *fh;
DeferEvent defer_open;
/**
* To inject the Open() call into the I/O thread.
*/
InjectEvent defer_open;
public:
NfsFileReader() noexcept;
......@@ -150,7 +153,7 @@ private:
void OnNfsCallback(unsigned status, void *data) noexcept final;
void OnNfsError(std::exception_ptr &&e) noexcept final;
/* DeferEvent callback */
/* InjectEvent callback */
void OnDeferredOpen() noexcept;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment