decoder/wavpack: convert pointer to reference
This commit is contained in:
parent
b4f751080d
commit
24ce5da2b8
@ -61,11 +61,11 @@ WavpackOpenInput(Path path, int flags, int norm_offset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static WavpackContext *
|
static WavpackContext *
|
||||||
WavpackOpenInput(WavpackStreamReader64 *reader, void *wv_id, void *wvc_id,
|
WavpackOpenInput(WavpackStreamReader64 &reader, void *wv_id, void *wvc_id,
|
||||||
int flags, int norm_offset)
|
int flags, int norm_offset)
|
||||||
{
|
{
|
||||||
char error[ERRORLEN];
|
char error[ERRORLEN];
|
||||||
auto *wpc = WavpackOpenFileInputEx64(reader, wv_id, wvc_id, error,
|
auto *wpc = WavpackOpenFileInputEx64(&reader, wv_id, wvc_id, error,
|
||||||
flags, norm_offset);
|
flags, norm_offset);
|
||||||
if (wpc == nullptr)
|
if (wpc == nullptr)
|
||||||
throw FormatRuntimeError("failed to open WavPack stream: %s",
|
throw FormatRuntimeError("failed to open WavPack stream: %s",
|
||||||
@ -448,7 +448,7 @@ wavpack_streamdecode(DecoderClient &client, InputStream &is)
|
|||||||
|
|
||||||
WavpackInput isp(&client, is);
|
WavpackInput isp(&client, is);
|
||||||
|
|
||||||
auto *wpc = WavpackOpenInput(&mpd_is_reader, &isp, wvc.get(),
|
auto *wpc = WavpackOpenInput(mpd_is_reader, &isp, wvc.get(),
|
||||||
open_flags, 0);
|
open_flags, 0);
|
||||||
AtScopeExit(wpc) {
|
AtScopeExit(wpc) {
|
||||||
WavpackCloseFile(wpc);
|
WavpackCloseFile(wpc);
|
||||||
@ -515,8 +515,8 @@ wavpack_scan_stream(InputStream &is, TagHandler &handler)
|
|||||||
|
|
||||||
WavpackContext *wpc;
|
WavpackContext *wpc;
|
||||||
try {
|
try {
|
||||||
wpc = WavpackOpenInput(&mpd_is_reader, &isp, nullptr,
|
wpc = WavpackOpenInput(mpd_is_reader, &isp, nullptr,
|
||||||
OPEN_DSD_FLAG, 0);
|
OPEN_DSD_FLAG, 0);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user