Browse Source

Remove unnecessary cleanup code that impeded cases where multiple decoders could handle a single file type.

master
Christopher Snowhill 8 months ago
parent
commit
c1a45135b3
15 changed files with 0 additions and 43 deletions
  1. +0
    -1
      Plugins/APL/APLDecoder.m
  2. +0
    -5
      Plugins/AdPlug/AdPlug/AdPlugDecoder.mm
  3. +0
    -1
      Plugins/ArchiveSource/ArchiveSource/ArchiveSource.m
  4. +0
    -1
      Plugins/CoreAudio/CoreAudioDecoder.m
  5. +0
    -1
      Plugins/CueSheet/CueSheetDecoder.m
  6. +0
    -1
      Plugins/FileSource/FileSource.m
  7. +0
    -2
      Plugins/Flac/FlacDecoder.m
  8. +0
    -4
      Plugins/GME/GameDecoder.m
  9. +0
    -2
      Plugins/MIDI/MIDI/MIDIDecoder.mm
  10. +0
    -2
      Plugins/Musepack/MusepackDecoder.m
  11. +0
    -5
      Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm
  12. +0
    -6
      Plugins/Opus/Opus/OpusDecoder.m
  13. +0
    -1
      Plugins/Shorten/ShortenDecoder.mm
  14. +0
    -6
      Plugins/Vorbis/VorbisDecoder.m
  15. +0
    -5
      Plugins/sidplay/SidDecoder.mm

+ 0
- 1
Plugins/APL/APLDecoder.m View File

@@ -32,7 +32,6 @@
return NO;
NSURL *url = [s url];
[s close];
apl = [APLFile createWithFile:[url path]];


+ 0
- 5
Plugins/AdPlug/AdPlug/AdPlugDecoder.mm View File

@@ -138,11 +138,6 @@
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}

- (void)dealloc


+ 0
- 1
Plugins/ArchiveSource/ArchiveSource/ArchiveSource.m View File

@@ -184,7 +184,6 @@ static BOOL g_parse_unpack_path(NSString * src, NSString ** archive, NSString **

- (void)dealloc {
[self close];
[self setURL:nil];
}

@end

+ 0
- 1
Plugins/CoreAudio/CoreAudioDecoder.m View File

@@ -50,7 +50,6 @@
OSStatus err;
NSURL *url = [source url];
[source close]; //There's no room for your kind around here!
err = ExtAudioFileOpenURL((__bridge CFURLRef)url, &_in);
if(noErr != err) {


+ 0
- 1
Plugins/CueSheet/CueSheetDecoder.m View File

@@ -48,7 +48,6 @@
}

NSURL *url = [s url];
[s close];

cuesheet = [CueSheet cueSheetWithFile:[url path]];


+ 0
- 1
Plugins/FileSource/FileSource.m View File

@@ -157,7 +157,6 @@

- (void)dealloc {
[self close];
[self setURL:nil];
}

@end

+ 0
- 2
Plugins/Flac/FlacDecoder.m View File

@@ -253,8 +253,6 @@ void ErrorCallback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorS
{
free(blockBuffer);
}
[source close];
[self setSource:nil];

decoder = NULL;
blockBuffer = NULL;


+ 0
- 4
Plugins/GME/GameDecoder.m View File

@@ -200,10 +200,6 @@ gme_err_t readCallback( void* data, void* out, long count )
gme_delete(emu);
emu = NULL;
}
if (source) {
[source close];
[self setSource:nil];
}
}

- (void)dealloc


+ 0
- 2
Plugins/MIDI/MIDI/MIDIDecoder.mm View File

@@ -341,8 +341,6 @@ static OSType getOSType(const char * in_)
{
delete player;
player = NULL;
[source close];
source = nil;
}

- (void)dealloc


+ 0
- 2
Plugins/Musepack/MusepackDecoder.m View File

@@ -174,8 +174,6 @@ mpc_bool_t CanSeekProc(mpc_reader *p_reader)
mpc_demux_exit(demux);
demux = NULL;
}
[source close];
source = nil;
}

- (void)dealloc


+ 0
- 5
Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm View File

@@ -153,11 +153,6 @@ static void g_push_archive_extensions(std::vector<std::string> & list)
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}

- (void)dealloc


+ 0
- 6
Plugins/Opus/Opus/OpusDecoder.m View File

@@ -29,9 +29,6 @@ int sourceSeek(void *_stream, opus_int64 _offset, int _whence)

int sourceClose(void *_stream)
{
id source = (__bridge id)_stream;
[source close];

return 0;
}

@@ -123,9 +120,6 @@ opus_int64 sourceTell(void *_stream)
{
op_free(opusRef);
opusRef = NULL;
[source close];
source = nil;
}

- (void)dealloc


+ 0
- 1
Plugins/Shorten/ShortenDecoder.mm View File

@@ -13,7 +13,6 @@
- (BOOL)open:(id<CogSource>)source
{
NSURL *url = [source url];
[source close];

if (![[url scheme] isEqualToString:@"file"])
return NO;


+ 0
- 6
Plugins/Vorbis/VorbisDecoder.m View File

@@ -27,9 +27,6 @@ int sourceSeek(void *datasource, ogg_int64_t offset, int whence)

int sourceClose(void *datasource)
{
id source = (__bridge id)datasource;
[source close];

return 0;
}

@@ -117,9 +114,6 @@ long sourceTell(void *datasource)
- (void)close
{
ov_clear(&vorbisRef);
[source close];
source = nil;
}

- (void)dealloc


+ 0
- 5
Plugins/sidplay/SidDecoder.mm View File

@@ -215,11 +215,6 @@
- (void)close
{
[self cleanUp];
if (source) {
[source close];
[self setSource:nil];
}
}

- (void)dealloc


Loading…
Cancel
Save