Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
82337dec
Commit
82337dec
authored
May 11, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InputStream: add virtual destructor
Replaces the method Close().
parent
f1d07002
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
48 additions
and
180 deletions
+48
-180
TagFile.cxx
src/TagFile.cxx
+1
-2
TagStream.cxx
src/TagStream.cxx
+1
-1
Bzip2ArchivePlugin.cxx
src/archive/plugins/Bzip2ArchivePlugin.cxx
+2
-18
Iso9660ArchivePlugin.cxx
src/archive/plugins/Iso9660ArchivePlugin.cxx
+0
-9
ZzipArchivePlugin.cxx
src/archive/plugins/ZzipArchivePlugin.cxx
+0
-9
DecoderThread.cxx
src/decoder/DecoderThread.cxx
+2
-2
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+2
-2
InputPlugin.hxx
src/input/InputPlugin.hxx
+0
-1
InputStream.cxx
src/input/InputStream.cxx
+5
-8
InputStream.hxx
src/input/InputStream.hxx
+7
-7
ThreadInputStream.cxx
src/input/ThreadInputStream.cxx
+9
-22
ThreadInputStream.hxx
src/input/ThreadInputStream.hxx
+0
-2
AlsaInputPlugin.cxx
src/input/plugins/AlsaInputPlugin.cxx
+0
-8
ArchiveInputPlugin.cxx
src/input/plugins/ArchiveInputPlugin.cxx
+0
-1
CdioParanoiaInputPlugin.cxx
src/input/plugins/CdioParanoiaInputPlugin.cxx
+0
-9
CurlInputPlugin.cxx
src/input/plugins/CurlInputPlugin.cxx
+0
-9
DespotifyInputPlugin.cxx
src/input/plugins/DespotifyInputPlugin.cxx
+7
-13
FfmpegInputPlugin.cxx
src/input/plugins/FfmpegInputPlugin.cxx
+0
-9
FileInputPlugin.cxx
src/input/plugins/FileInputPlugin.cxx
+0
-9
MmsInputPlugin.cxx
src/input/plugins/MmsInputPlugin.cxx
+0
-1
NfsInputPlugin.cxx
src/input/plugins/NfsInputPlugin.cxx
+0
-8
RewindInputPlugin.cxx
src/input/plugins/RewindInputPlugin.cxx
+1
-10
SmbclientInputPlugin.cxx
src/input/plugins/SmbclientInputPlugin.cxx
+0
-8
CloseSongEnumerator.cxx
src/playlist/CloseSongEnumerator.cxx
+1
-1
PlaylistStream.cxx
src/playlist/PlaylistStream.cxx
+2
-2
SoundCloudPlaylistPlugin.cxx
src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
+2
-2
dump_playlist.cxx
test/dump_playlist.cxx
+2
-3
dump_text_file.cxx
test/dump_text_file.cxx
+1
-1
read_tags.cxx
test/read_tags.cxx
+1
-1
run_decoder.cxx
test/run_decoder.cxx
+1
-1
run_input.cxx
test/run_input.cxx
+1
-1
No files found.
src/TagFile.cxx
View file @
82337dec
...
...
@@ -48,8 +48,7 @@ public:
is
(
nullptr
)
{}
~
TagFileScan
()
{
if
(
is
!=
nullptr
)
is
->
Close
();
delete
is
;
}
bool
ScanFile
(
const
DecoderPlugin
&
plugin
)
{
...
...
src/TagStream.cxx
View file @
82337dec
...
...
@@ -73,6 +73,6 @@ tag_stream_scan(const char *uri, const tag_handler &handler, void *ctx)
return
false
;
bool
success
=
tag_stream_scan
(
*
is
,
handler
,
ctx
);
is
->
Close
()
;
delete
is
;
return
success
;
}
src/archive/plugins/Bzip2ArchivePlugin.cxx
View file @
82337dec
...
...
@@ -61,7 +61,7 @@ public:
}
~
Bzip2ArchiveFile
()
{
istream
->
Close
()
;
delete
istream
;
}
void
Ref
()
{
...
...
@@ -102,7 +102,6 @@ struct Bzip2InputStream final : public InputStream {
~
Bzip2InputStream
();
bool
Open
(
Error
&
error
);
void
Close
();
};
extern
const
InputPlugin
bz2_inputplugin
;
...
...
@@ -132,12 +131,6 @@ Bzip2InputStream::Open(Error &error)
return
true
;
}
inline
void
Bzip2InputStream
::
Close
()
{
BZ2_bzDecompressEnd
(
&
bzstream
);
}
/* archive open && listing routine */
static
ArchiveFile
*
...
...
@@ -166,6 +159,7 @@ Bzip2InputStream::Bzip2InputStream(Bzip2ArchiveFile &_context,
Bzip2InputStream
::~
Bzip2InputStream
()
{
BZ2_bzDecompressEnd
(
&
bzstream
);
archive
->
Unref
();
}
...
...
@@ -183,15 +177,6 @@ Bzip2ArchiveFile::OpenStream(const char *path,
return
bis
;
}
static
void
bz2_is_close
(
InputStream
*
is
)
{
Bzip2InputStream
*
bis
=
(
Bzip2InputStream
*
)
is
;
bis
->
Close
();
delete
bis
;
}
static
bool
bz2_fillbuffer
(
Bzip2InputStream
*
bis
,
Error
&
error
)
{
...
...
@@ -273,7 +258,6 @@ const InputPlugin bz2_inputplugin = {
nullptr
,
nullptr
,
nullptr
,
bz2_is_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/archive/plugins/Iso9660ArchivePlugin.cxx
View file @
82337dec
...
...
@@ -181,14 +181,6 @@ Iso9660ArchiveFile::OpenStream(const char *pathname,
statbuf
);
}
static
void
iso9660_input_close
(
InputStream
*
is
)
{
Iso9660InputStream
*
iis
=
(
Iso9660InputStream
*
)
is
;
delete
iis
;
}
inline
size_t
Iso9660InputStream
::
Read
(
void
*
ptr
,
size_t
read_size
,
Error
&
error
)
{
...
...
@@ -250,7 +242,6 @@ const InputPlugin iso9660_input_plugin = {
nullptr
,
nullptr
,
nullptr
,
iso9660_input_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/archive/plugins/ZzipArchivePlugin.cxx
View file @
82337dec
...
...
@@ -142,14 +142,6 @@ ZzipArchiveFile::OpenStream(const char *pathname,
_file
);
}
static
void
zzip_input_close
(
InputStream
*
is
)
{
ZzipInputStream
*
zis
=
(
ZzipInputStream
*
)
is
;
delete
zis
;
}
static
size_t
zzip_input_read
(
InputStream
*
is
,
void
*
ptr
,
size_t
size
,
Error
&
error
)
...
...
@@ -202,7 +194,6 @@ const InputPlugin zzip_input_plugin = {
nullptr
,
nullptr
,
nullptr
,
zzip_input_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/decoder/DecoderThread.cxx
View file @
82337dec
...
...
@@ -271,7 +271,7 @@ decoder_run_stream(Decoder &decoder, const char *uri)
decoder_run_stream_fallback
(
decoder
,
*
input_stream
));
dc
.
Unlock
();
input_stream
->
Close
()
;
delete
input_stream
;
dc
.
Lock
();
return
success
;
...
...
@@ -318,7 +318,7 @@ TryDecoderFile(Decoder &decoder, Path path_fs, const char *suffix,
dc
.
Unlock
();
input_stream
->
Close
()
;
delete
input_stream
;
if
(
success
)
{
dc
.
Lock
();
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
82337dec
...
...
@@ -467,7 +467,7 @@ wavpack_open_wvc(Decoder &decoder, const char *uri,
size_t
nbytes
=
decoder_read
(
decoder
,
*
is_wvc
,
&
first_byte
,
sizeof
(
first_byte
));
if
(
nbytes
==
0
)
{
is_wvc
->
Close
()
;
delete
is_wvc
;
return
nullptr
;
}
...
...
@@ -519,7 +519,7 @@ wavpack_streamdecode(Decoder &decoder, InputStream &is)
WavpackCloseFile
(
wpc
);
if
(
open_flags
&
OPEN_WVC
)
{
is_wvc
->
Close
()
;
delete
is_wvc
;
}
}
...
...
src/input/InputPlugin.hxx
View file @
82337dec
...
...
@@ -82,7 +82,6 @@ struct InputPlugin {
InputStream
*
(
*
open
)(
const
char
*
uri
,
Mutex
&
mutex
,
Cond
&
cond
,
Error
&
error
);
void
(
*
close
)(
InputStream
*
is
);
/**
* Check for errors that may have occurred in the I/O thread.
...
...
src/input/InputStream.cxx
View file @
82337dec
...
...
@@ -31,6 +31,10 @@
static
constexpr
Domain
input_domain
(
"input"
);
InputStream
::~
InputStream
()
{
}
InputStream
*
InputStream
::
Open
(
const
char
*
url
,
Mutex
&
mutex
,
Cond
&
cond
,
...
...
@@ -41,7 +45,6 @@ InputStream::Open(const char *url,
is
=
plugin
->
open
(
url
,
mutex
,
cond
,
error
);
if
(
is
!=
nullptr
)
{
assert
(
is
->
plugin
.
close
!=
nullptr
);
assert
(
is
->
plugin
.
read
!=
nullptr
);
assert
(
is
->
plugin
.
eof
!=
nullptr
);
assert
(
!
is
->
seekable
||
is
->
plugin
.
seek
!=
nullptr
);
...
...
@@ -72,7 +75,7 @@ InputStream::OpenReady(const char *uri,
mutex
.
unlock
();
if
(
!
success
)
{
is
->
Close
()
;
delete
is
;
is
=
nullptr
;
}
...
...
@@ -202,12 +205,6 @@ InputStream::LockRead(void *ptr, size_t _size, Error &error)
return
Read
(
ptr
,
_size
,
error
);
}
void
InputStream
::
Close
()
{
plugin
.
close
(
this
);
}
bool
InputStream
::
IsEOF
()
{
...
...
src/input/InputStream.hxx
View file @
82337dec
...
...
@@ -109,6 +109,13 @@ public:
}
/**
* Close the input stream and free resources.
*
* The caller must not lock the mutex.
*/
virtual
~
InputStream
();
/**
* Opens a new input stream. You may not access it until the "ready"
* flag is set.
*
...
...
@@ -133,13 +140,6 @@ public:
Mutex
&
mutex
,
Cond
&
cond
,
Error
&
error
);
/**
* Close the input stream and free resources.
*
* The caller must not lock the mutex.
*/
void
Close
();
const
InputPlugin
&
GetPlugin
()
const
{
return
plugin
;
}
...
...
src/input/ThreadInputStream.cxx
View file @
82337dec
...
...
@@ -29,6 +29,15 @@
ThreadInputStream
::~
ThreadInputStream
()
{
Lock
();
close
=
true
;
wake_cond
.
signal
();
Unlock
();
Cancel
();
thread
.
Join
();
if
(
buffer
!=
nullptr
)
{
buffer
->
Clear
();
HugeFree
(
buffer
->
Write
().
data
,
buffer_size
);
...
...
@@ -172,28 +181,6 @@ ThreadInputStream::Read(InputStream *is, void *ptr, size_t size,
return
tis
.
Read2
(
ptr
,
size
,
error
);
}
inline
void
ThreadInputStream
::
Close2
()
{
Lock
();
close
=
true
;
wake_cond
.
signal
();
Unlock
();
Cancel
();
thread
.
Join
();
delete
this
;
}
void
ThreadInputStream
::
Close
(
InputStream
*
is
)
{
ThreadInputStream
&
tis
=
*
(
ThreadInputStream
*
)
is
;
tis
.
Close2
();
}
inline
bool
ThreadInputStream
::
IsEOF2
()
{
...
...
src/input/ThreadInputStream.hxx
View file @
82337dec
...
...
@@ -134,7 +134,6 @@ private:
bool
Check2
(
Error
&
error
);
bool
Available2
();
size_t
Read2
(
void
*
ptr
,
size_t
size
,
Error
&
error
);
void
Close2
();
bool
IsEOF2
();
public
:
...
...
@@ -143,7 +142,6 @@ public:
static
bool
Available
(
InputStream
*
is
);
static
size_t
Read
(
InputStream
*
is
,
void
*
ptr
,
size_t
size
,
Error
&
error
);
static
void
Close
(
InputStream
*
is
);
static
bool
IsEOF
(
InputStream
*
is
);
};
...
...
src/input/plugins/AlsaInputPlugin.cxx
View file @
82337dec
...
...
@@ -373,13 +373,6 @@ alsa_input_open(const char *uri, Mutex &mutex, Cond &cond, Error &error)
return
AlsaInputStream
::
Create
(
uri
,
mutex
,
cond
,
error
);
}
static
void
alsa_input_close
(
InputStream
*
is
)
{
AlsaInputStream
*
ais
=
(
AlsaInputStream
*
)
is
;
delete
ais
;
}
static
bool
alsa_input_available
(
InputStream
*
is
)
{
...
...
@@ -406,7 +399,6 @@ const struct InputPlugin input_plugin_alsa = {
nullptr
,
nullptr
,
alsa_input_open
,
alsa_input_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/input/plugins/ArchiveInputPlugin.cxx
View file @
82337dec
...
...
@@ -96,5 +96,4 @@ const InputPlugin input_plugin_archive = {
nullptr
,
nullptr
,
nullptr
,
nullptr
,
};
src/input/plugins/CdioParanoiaInputPlugin.cxx
View file @
82337dec
...
...
@@ -105,14 +105,6 @@ input_cdio_init(const config_param ¶m, Error &error)
return
InputPlugin
::
InitResult
::
SUCCESS
;
}
static
void
input_cdio_close
(
InputStream
*
is
)
{
CdioParanoiaInputStream
*
i
=
(
CdioParanoiaInputStream
*
)
is
;
delete
i
;
}
struct
cdio_uri
{
char
device
[
64
];
int
track
;
...
...
@@ -394,7 +386,6 @@ const InputPlugin input_plugin_cdio_paranoia = {
input_cdio_init
,
nullptr
,
input_cdio_open
,
input_cdio_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/input/plugins/CurlInputPlugin.cxx
View file @
82337dec
...
...
@@ -805,14 +805,6 @@ input_curl_read(InputStream *is, void *ptr, size_t size,
return
c
.
Read
(
ptr
,
size
,
error
);
}
static
void
input_curl_close
(
InputStream
*
is
)
{
CurlInputStream
*
c
=
(
CurlInputStream
*
)
is
;
delete
c
;
}
static
bool
input_curl_eof
(
gcc_unused
InputStream
*
is
)
{
...
...
@@ -1144,7 +1136,6 @@ const struct InputPlugin input_plugin_curl = {
input_curl_init
,
input_curl_finish
,
input_curl_open
,
input_curl_close
,
input_curl_check
,
nullptr
,
input_curl_tag
,
...
...
src/input/plugins/DespotifyInputPlugin.cxx
View file @
82337dec
...
...
@@ -61,9 +61,7 @@ class DespotifyInputStream final : public InputStream {
}
public
:
~
DespotifyInputStream
()
{
despotify_free_track
(
track
);
}
~
DespotifyInputStream
();
static
InputStream
*
Open
(
const
char
*
url
,
Mutex
&
mutex
,
Cond
&
cond
,
Error
&
error
);
...
...
@@ -146,6 +144,12 @@ static void callback(gcc_unused struct despotify_session* ds,
ctx
->
Callback
(
sig
);
}
DespotifyInputStream
::~
DespotifyInputStream
()
{
mpd_despotify_unregister_callback
(
callback
);
despotify_free_track
(
track
);
}
inline
InputStream
*
DespotifyInputStream
::
Open
(
const
char
*
url
,
Mutex
&
mutex
,
Cond
&
cond
,
...
...
@@ -220,15 +224,6 @@ input_despotify_read(InputStream *is, void *ptr, size_t size, Error &error)
return
ctx
->
Read
(
ptr
,
size
,
error
);
}
static
void
input_despotify_close
(
InputStream
*
is
)
{
DespotifyInputStream
*
ctx
=
(
DespotifyInputStream
*
)
is
;
mpd_despotify_unregister_callback
(
callback
);
delete
ctx
;
}
static
bool
input_despotify_eof
(
InputStream
*
is
)
{
...
...
@@ -250,7 +245,6 @@ const InputPlugin input_plugin_despotify = {
nullptr
,
nullptr
,
input_despotify_open
,
input_despotify_close
,
nullptr
,
nullptr
,
input_despotify_tag
,
...
...
src/input/plugins/FfmpegInputPlugin.cxx
View file @
82337dec
...
...
@@ -125,14 +125,6 @@ input_ffmpeg_read(InputStream *is, void *ptr, size_t size,
return
(
size_t
)
ret
;
}
static
void
input_ffmpeg_close
(
InputStream
*
is
)
{
FfmpegInputStream
*
i
=
(
FfmpegInputStream
*
)
is
;
delete
i
;
}
static
bool
input_ffmpeg_eof
(
InputStream
*
is
)
{
...
...
@@ -163,7 +155,6 @@ const InputPlugin input_plugin_ffmpeg = {
input_ffmpeg_init
,
nullptr
,
input_ffmpeg_open
,
input_ffmpeg_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/input/plugins/FileInputPlugin.cxx
View file @
82337dec
...
...
@@ -123,14 +123,6 @@ input_file_read(InputStream *is, void *ptr, size_t size,
return
(
size_t
)
nbytes
;
}
static
void
input_file_close
(
InputStream
*
is
)
{
FileInputStream
*
fis
=
(
FileInputStream
*
)
is
;
delete
fis
;
}
static
bool
input_file_eof
(
InputStream
*
is
)
{
...
...
@@ -142,7 +134,6 @@ const InputPlugin input_plugin_file = {
nullptr
,
nullptr
,
input_file_open
,
input_file_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/input/plugins/MmsInputPlugin.cxx
View file @
82337dec
...
...
@@ -106,7 +106,6 @@ const InputPlugin input_plugin_mms = {
nullptr
,
nullptr
,
input_mms_open
,
ThreadInputStream
::
Close
,
ThreadInputStream
::
Check
,
nullptr
,
nullptr
,
...
...
src/input/plugins/NfsInputPlugin.cxx
View file @
82337dec
...
...
@@ -156,13 +156,6 @@ input_nfs_read(InputStream *is, void *ptr, size_t size,
return
s
.
Read
(
ptr
,
size
,
error
);
}
static
void
input_nfs_close
(
InputStream
*
is
)
{
NfsInputStream
*
s
=
(
NfsInputStream
*
)
is
;
delete
s
;
}
static
bool
input_nfs_eof
(
InputStream
*
is
)
{
...
...
@@ -184,7 +177,6 @@ const InputPlugin input_plugin_nfs = {
nullptr
,
nullptr
,
input_nfs_open
,
input_nfs_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/input/plugins/RewindInputPlugin.cxx
View file @
82337dec
...
...
@@ -60,7 +60,7 @@ public:
}
~
RewindInputStream
()
{
input
->
Close
()
;
delete
input
;
}
bool
Check
(
Error
&
error
)
{
...
...
@@ -121,14 +121,6 @@ private:
}
};
static
void
input_rewind_close
(
InputStream
*
is
)
{
RewindInputStream
*
r
=
(
RewindInputStream
*
)
is
;
delete
r
;
}
static
bool
input_rewind_check
(
InputStream
*
is
,
Error
&
error
)
{
...
...
@@ -263,7 +255,6 @@ const InputPlugin rewind_input_plugin = {
nullptr
,
nullptr
,
nullptr
,
input_rewind_close
,
input_rewind_check
,
input_rewind_update
,
input_rewind_tag
,
...
...
src/input/plugins/SmbclientInputPlugin.cxx
View file @
82337dec
...
...
@@ -149,13 +149,6 @@ input_smbclient_read(InputStream *is, void *ptr, size_t size,
return
s
.
Read
(
ptr
,
size
,
error
);
}
static
void
input_smbclient_close
(
InputStream
*
is
)
{
SmbclientInputStream
*
s
=
(
SmbclientInputStream
*
)
is
;
delete
s
;
}
static
bool
input_smbclient_eof
(
InputStream
*
is
)
{
...
...
@@ -177,7 +170,6 @@ const InputPlugin input_plugin_smbclient = {
input_smbclient_init
,
nullptr
,
input_smbclient_open
,
input_smbclient_close
,
nullptr
,
nullptr
,
nullptr
,
...
...
src/playlist/CloseSongEnumerator.cxx
View file @
82337dec
...
...
@@ -24,7 +24,7 @@
CloseSongEnumerator
::~
CloseSongEnumerator
()
{
delete
other
;
is
->
Close
()
;
delete
is
;
}
DetachedSong
*
...
...
src/playlist/PlaylistStream.cxx
View file @
82337dec
...
...
@@ -50,7 +50,7 @@ playlist_open_path_suffix(const char *path_fs, Mutex &mutex, Cond &cond)
if
(
playlist
!=
nullptr
)
playlist
=
new
CloseSongEnumerator
(
playlist
,
is
);
else
is
->
Close
()
;
delete
is
;
return
playlist
;
}
...
...
@@ -85,7 +85,7 @@ playlist_open_remote(const char *uri, Mutex &mutex, Cond &cond)
playlist
=
playlist_list_open_stream
(
*
is
,
uri
);
if
(
playlist
==
nullptr
)
{
is
->
Close
()
;
delete
is
;
return
nullptr
;
}
...
...
src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
View file @
82337dec
...
...
@@ -276,7 +276,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
done
=
true
;
}
else
{
mutex
.
unlock
();
input_stream
->
Close
()
;
delete
input_stream
;
return
-
1
;
}
}
...
...
@@ -304,7 +304,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
}
mutex
.
unlock
();
input_stream
->
Close
()
;
delete
input_stream
;
return
0
;
}
...
...
test/dump_playlist.cxx
View file @
82337dec
...
...
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
playlist
=
playlist_list_open_stream
(
*
is
,
uri
);
if
(
playlist
==
NULL
)
{
is
->
Close
()
;
delete
is
;
fprintf
(
stderr
,
"Failed to open playlist
\n
"
);
return
2
;
}
...
...
@@ -139,8 +139,7 @@ int main(int argc, char **argv)
/* deinitialize everything */
delete
playlist
;
if
(
is
!=
NULL
)
is
->
Close
();
delete
is
;
decoder_plugin_deinit_all
();
playlist_list_global_finish
();
...
...
test/dump_text_file.cxx
View file @
82337dec
...
...
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
InputStream
*
is
=
InputStream
::
OpenReady
(
argv
[
1
],
mutex
,
cond
,
error
);
if
(
is
!=
NULL
)
{
ret
=
dump_input_stream
(
*
is
);
is
->
Close
()
;
delete
is
;
}
else
{
if
(
error
.
IsDefined
())
LogError
(
error
);
...
...
test/read_tags.cxx
View file @
82337dec
...
...
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
}
success
=
plugin
->
ScanStream
(
*
is
,
print_handler
,
nullptr
);
is
->
Close
()
;
delete
is
;
}
decoder_plugin_deinit_all
();
...
...
test/run_decoder.cxx
View file @
82337dec
...
...
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
decoder
.
plugin
->
StreamDecode
(
decoder
,
*
is
);
is
->
Close
()
;
delete
is
;
}
else
{
fprintf
(
stderr
,
"Decoder plugin is not usable
\n
"
);
return
EXIT_FAILURE
;
...
...
test/run_input.cxx
View file @
82337dec
...
...
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
is
=
InputStream
::
OpenReady
(
argv
[
1
],
mutex
,
cond
,
error
);
if
(
is
!=
NULL
)
{
ret
=
dump_input_stream
(
is
);
is
->
Close
()
;
delete
is
;
}
else
{
if
(
error
.
IsDefined
())
LogError
(
error
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment