From 3dc5ed39764ecc6cf29d2c743273566493c9e6e0 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Tue, 24 Nov 2015 15:36:52 +0100 Subject: [PATCH] Fix two memory leaks. --- MP42/MP42File.h | 11 +++++------ MP42/MP42File.m | 11 ++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/MP42/MP42File.h b/MP42/MP42File.h index fe620e5..ae23c41 100644 --- a/MP42/MP42File.h +++ b/MP42/MP42File.h @@ -177,6 +177,11 @@ typedef void (^MP42FileProgressHandler)(double progress); */ - (void)organizeAlternateGroups; +/** + * Set automatically a fallback track for AC3 if Stereo track in the same language is present + */ +- (void)setAutoFallback; + @property (nonatomic, readwrite, copy, nullable) MP42FileProgressHandler progressHandler; /** @@ -222,12 +227,6 @@ typedef void (^MP42FileProgressHandler)(double progress); */ - (void)cancel; - -/** - * Auto set fallback track - */ -- (void)setAutoFallback; - @end NS_ASSUME_NONNULL_END diff --git a/MP42/MP42File.m b/MP42/MP42File.m index b7df695..5fdefd0 100644 --- a/MP42/MP42File.m +++ b/MP42/MP42File.m @@ -1013,11 +1013,10 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) { return NO; } - #pragma mark - Auto Fallback -// -// Set automatically a fallback track for AC3 if Stereo track in the same language is present -// +/** + * Set automatically a fallback track for AC3 if Stereo track in the same language is present + */ - (void)setAutoFallback { NSMutableArray *availableFallbackTracks = [[NSMutableArray alloc] init]; @@ -1052,8 +1051,10 @@ static void logCallback(MP4LogLevel loglevel, const char *fmt, va_list ap) { } counter++; } -} + [availableFallbackTracks release]; + [needFallbackTracks release]; +} #pragma mark - NSCoding