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
e8201f7f
Commit
e8201f7f
authored
Mar 09, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mac OS X gui: Make sure we don't end up with a freed p_input.
parent
b8241217
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
8 deletions
+30
-8
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+30
-8
No files found.
modules/gui/macosx/intf.m
View file @
e8201f7f
...
...
@@ -1116,12 +1116,15 @@ static VLCMain *_o_sharedMainInstance = nil;
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
/** \todo fix i_size use */
b_plmul
=
p_playlist
->
items
.
i_size
>
1
;
PL_LOCK
;
p_input
=
p_playlist
->
p_input
;
if
(
p_input
)
vlc_object_yield
(
p_input
);
PL_UNLOCK
;
if
(
(
b_input
=
(
p_input
!=
NULL
)
)
)
{
/* seekable streams */
vlc_object_yield
(
p_input
);
b_seekable
=
var_GetBool
(
p_input
,
"seekable"
);
/* check wether slow/fast motion is possible*/
...
...
@@ -1175,12 +1178,15 @@ static VLCMain *_o_sharedMainInstance = nil;
}
p_playlist
=
pl_Yield
(
p_intf
);
PL_LOCK
;
p_input
=
p_playlist
->
p_input
;
if
(
p_input
)
vlc_object_yield
(
p_input
);
PL_UNLOCK
;
if
(
p_input
&&
!
p_input
->
b_die
)
{
vlc_value_t
val
;
vlc_object_yield
(
p_input
);
if
(
p_intf
->
p_sys
->
b_current_title_update
)
{
...
...
@@ -1254,7 +1260,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[
self
playStatusUpdated
:
p_intf
->
p_sys
->
i_play_status
];
[
o_embedded_window
playStatusUpdated
:
p_intf
->
p_sys
->
i_play_status
];
}
vlc_object_release
(
p_input
);
}
else
{
...
...
@@ -1264,6 +1269,8 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_embedded_window
playStatusUpdated
:
p_intf
->
p_sys
->
i_play_status
];
[
self
setSubmenusEnabled
:
FALSE
];
}
if
(
p_input
)
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
[
self
updateMessageArray
];
...
...
@@ -1279,10 +1286,15 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
setupMenus
{
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
input_thread_t
*
p_input
=
p_playlist
->
p_input
;
input_thread_t
*
p_input
;
PL_LOCK
;
p_input
=
p_playlist
->
p_input
;
if
(
p_input
)
vlc_object_yield
(
p_input
);
PL_UNLOCK
;
if
(
p_input
!=
NULL
)
{
vlc_object_yield
(
p_input
);
[
o_controls
setupVarMenuItem
:
o_mi_program
target
:
(
vlc_object_t
*
)
p_input
var:
"program"
selector
:
@selector
(
toggleVar
:
)];
...
...
@@ -1393,13 +1405,17 @@ static VLCMain *_o_sharedMainInstance = nil;
-
(
void
)
resetScrollField
{
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
input_thread_t
*
p_input
=
p_playlist
->
p_input
;
input_thread_t
*
p_input
;
PL_LOCK
;
p_input
=
p_playlist
->
p_input
;
if
(
p_input
)
vlc_object_yield
(
p_input
);
PL_UNLOCK
;
i_end_scroll
=
-
1
;
if
(
p_input
&&
!
p_input
->
b_die
)
{
NSString
*
o_temp
;
vlc_object_yield
(
p_input
);
o_temp
=
[
NSString
stringWithUTF8String
:
p_playlist
->
status
.
p_item
->
p_input
->
psz_name
];
if
(
o_temp
==
NULL
)
...
...
@@ -1410,6 +1426,8 @@ static VLCMain *_o_sharedMainInstance = nil;
vlc_object_release
(
p_playlist
);
return
;
}
if
(
p_input
)
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
[
self
setScrollField
:
_NS
(
"VLC media player"
)
stopAfter
:
-
1
];
}
...
...
@@ -1550,14 +1568,18 @@ static VLCMain *_o_sharedMainInstance = nil;
return
;
}
p_playlist
=
pl_Yield
(
p_intf
);
PL_LOCK
;
p_input
=
p_playlist
->
p_input
;
if
(
p_input
)
vlc_object_yield
(
p_input
);
PL_UNLOCK
;
if
(
p_input
!=
NULL
)
{
vlc_value_t
time
;
vlc_value_t
pos
;
mtime_t
i_seconds
;
NSString
*
o_time
;
vlc_object_yield
(
p_input
);
pos
.
f_float
=
f_updated
/
10000
.;
var_Set
(
p_input
,
"position"
,
pos
);
...
...
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