decoder/Bridge: install an InputStreamHandler on local files

Before the advent of io_uring (commit dae8da7066), this didn't
matter, because the `FileInputStream` never called this.  But
`UringInputStream` is derived from `AsyncInputStream`, and needs the
handler to signal completion.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/898
This commit is contained in:
Max Kellermann 2020-06-09 21:02:51 +02:00
parent 759f4231d2
commit 068006ebd7
1 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,9 @@ DecoderBridge::OpenLocal(Path path_fs, const char *uri_utf8)
} }
} }
return OpenLocalInputStream(path_fs, dc.mutex); auto is = OpenLocalInputStream(path_fs, dc.mutex);
is->SetHandler(&dc);
return is;
} }
bool bool