Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c7462d45
Commit
c7462d45
authored
May 22, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fix purging of resume media data, avoid memleak
parent
001cae59
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+9
-2
No files found.
modules/gui/macosx/playlist.m
View file @
c7462d45
...
@@ -486,7 +486,11 @@
...
@@ -486,7 +486,11 @@
[
o_columnArray
addObject
:
[
NSArray
arrayWithObjects
:
TITLE_COLUMN
,
[
NSNumber
numberWithFloat
:
190
.],
nil
]];
[
o_columnArray
addObject
:
[
NSArray
arrayWithObjects
:
TITLE_COLUMN
,
[
NSNumber
numberWithFloat
:
190
.],
nil
]];
[
o_columnArray
addObject
:
[
NSArray
arrayWithObjects
:
ARTIST_COLUMN
,
[
NSNumber
numberWithFloat
:
95
.],
nil
]];
[
o_columnArray
addObject
:
[
NSArray
arrayWithObjects
:
ARTIST_COLUMN
,
[
NSNumber
numberWithFloat
:
95
.],
nil
]];
[
o_columnArray
addObject
:
[
NSArray
arrayWithObjects
:
DURATION_COLUMN
,
[
NSNumber
numberWithFloat
:
95
.],
nil
]];
[
o_columnArray
addObject
:
[
NSArray
arrayWithObjects
:
DURATION_COLUMN
,
[
NSNumber
numberWithFloat
:
95
.],
nil
]];
NSDictionary
*
appDefaults
=
[
NSDictionary
dictionaryWithObject
:[
NSArray
arrayWithArray
:
o_columnArray
]
forKey
:
@"PlaylistColumnSelection"
];
NSDictionary
*
appDefaults
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
NSArray
arrayWithArray
:
o_columnArray
],
@"PlaylistColumnSelection"
,
[
NSArray
array
],
@"recentlyPlayedMediaList"
,
[
NSDictionary
dictionary
],
@"recentlyPlayedMedia"
,
nil
];
[
defaults
registerDefaults
:
appDefaults
];
[
defaults
registerDefaults
:
appDefaults
];
[
o_columnArray
release
];
[
o_columnArray
release
];
...
@@ -1543,7 +1547,7 @@
...
@@ -1543,7 +1547,7 @@
float
f_current_pos
=
100
.
*
pos
.
f_float
;
float
f_current_pos
=
100
.
*
pos
.
f_float
;
long
long
int
dur
=
input_item_GetDuration
(
p_item
)
/
1000000
;
long
long
int
dur
=
input_item_GetDuration
(
p_item
)
/
1000000
;
int
current_pos_in_sec
=
(
f_current_pos
*
dur
)
/
100
;
int
current_pos_in_sec
=
(
f_current_pos
*
dur
)
/
100
;
NSMutableArray
*
mediaList
=
[
defaults
objectForKey
:
@"recentlyPlayedMediaList"
];
NSMutableArray
*
mediaList
=
[
[
defaults
objectForKey
:
@"recentlyPlayedMediaList"
]
mutableCopy
];
if
(
pos
.
f_float
>
.
05
&&
pos
.
f_float
<
.
95
&&
dur
>
180
)
{
if
(
pos
.
f_float
>
.
05
&&
pos
.
f_float
<
.
95
&&
dur
>
180
)
{
[
mutDict
setObject
:[
NSNumber
numberWithInt
:
current_pos_in_sec
]
forKey
:
url
];
[
mutDict
setObject
:[
NSNumber
numberWithInt
:
current_pos_in_sec
]
forKey
:
url
];
...
@@ -1564,6 +1568,9 @@
...
@@ -1564,6 +1568,9 @@
[
defaults
setObject
:
mutDict
forKey
:
@"recentlyPlayedMedia"
];
[
defaults
setObject
:
mutDict
forKey
:
@"recentlyPlayedMedia"
];
[
defaults
setObject
:
mediaList
forKey
:
@"recentlyPlayedMediaList"
];
[
defaults
setObject
:
mediaList
forKey
:
@"recentlyPlayedMediaList"
];
[
defaults
synchronize
];
[
defaults
synchronize
];
[
mutDict
release
];
[
mediaList
release
];
}
}
@end
@end
...
...
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