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
b5619a2f
Commit
b5619a2f
authored
Mar 20, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ncurses: fix object leak and use pl_Release instead of vlc_object_release.
parent
04ddaf37
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
modules/gui/ncurses.c
modules/gui/ncurses.c
+10
-9
No files found.
modules/gui/ncurses.c
View file @
b5619a2f
...
@@ -554,13 +554,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
...
@@ -554,13 +554,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
#define ReturnTrue \
#define ReturnTrue \
do { \
do { \
vlc_object_release( p_playlist
); \
pl_Release( p_intf
); \
return 1; \
return 1; \
} while(0)
} while(0)
#define ReturnFalse \
#define ReturnFalse \
do { \
do { \
vlc_object_release( p_playlist
); \
pl_Release( p_intf
); \
return 0; \
return 0; \
} while(0)
} while(0)
...
@@ -2212,7 +2212,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
...
@@ -2212,7 +2212,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
refresh
();
refresh
();
*
t_last_refresh
=
time
(
0
);
*
t_last_refresh
=
time
(
0
);
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
}
}
static
playlist_item_t
*
PlaylistGetRoot
(
intf_thread_t
*
p_intf
)
static
playlist_item_t
*
PlaylistGetRoot
(
intf_thread_t
*
p_intf
)
...
@@ -2229,7 +2229,7 @@ static playlist_item_t *PlaylistGetRoot( intf_thread_t *p_intf )
...
@@ -2229,7 +2229,7 @@ static playlist_item_t *PlaylistGetRoot( intf_thread_t *p_intf )
default:
default:
p_item
=
p_playlist
->
p_root_onelevel
;
p_item
=
p_playlist
->
p_root_onelevel
;
}
}
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
return
p_item
;
return
p_item
;
}
}
...
@@ -2250,7 +2250,7 @@ static void PlaylistRebuild( intf_thread_t *p_intf )
...
@@ -2250,7 +2250,7 @@ static void PlaylistRebuild( intf_thread_t *p_intf )
PL_UNLOCK
;
PL_UNLOCK
;
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
}
}
static
void
PlaylistAddNode
(
intf_thread_t
*
p_intf
,
playlist_item_t
*
p_node
,
static
void
PlaylistAddNode
(
intf_thread_t
*
p_intf
,
playlist_item_t
*
p_node
,
...
@@ -2314,7 +2314,7 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
...
@@ -2314,7 +2314,7 @@ static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
playlist_t
*
p_playlist
=
pl_Hold
(
p_intf
);
playlist_t
*
p_playlist
=
pl_Hold
(
p_intf
);
p_intf
->
p_sys
->
b_need_update
=
true
;
p_intf
->
p_sys
->
b_need_update
=
true
;
p_intf
->
p_sys
->
p_node
=
playlist_CurrentPlayingItem
(
p_playlist
)
?
playlist_CurrentPlayingItem
(
p_playlist
)
->
p_parent
:
NULL
;
p_intf
->
p_sys
->
p_node
=
playlist_CurrentPlayingItem
(
p_playlist
)
?
playlist_CurrentPlayingItem
(
p_playlist
)
->
p_parent
:
NULL
;
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -2389,7 +2389,7 @@ static void Eject( intf_thread_t *p_intf )
...
@@ -2389,7 +2389,7 @@ static void Eject( intf_thread_t *p_intf )
if
(
playlist_CurrentPlayingItem
(
p_playlist
)
==
NULL
)
if
(
playlist_CurrentPlayingItem
(
p_playlist
)
==
NULL
)
{
{
PL_UNLOCK
;
PL_UNLOCK
;
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
return
;
return
;
}
}
...
@@ -2449,6 +2449,7 @@ static void Eject( intf_thread_t *p_intf )
...
@@ -2449,6 +2449,7 @@ static void Eject( intf_thread_t *p_intf )
if
(
psz_device
==
NULL
)
if
(
psz_device
==
NULL
)
{
{
pl_Release
(
p_intf
);
return
;
return
;
}
}
...
@@ -2472,7 +2473,7 @@ static void Eject( intf_thread_t *p_intf )
...
@@ -2472,7 +2473,7 @@ static void Eject( intf_thread_t *p_intf )
}
}
free
(
psz_device
);
free
(
psz_device
);
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
return
;
return
;
}
}
...
@@ -2610,7 +2611,7 @@ static void PlayPause( intf_thread_t *p_intf )
...
@@ -2610,7 +2611,7 @@ static void PlayPause( intf_thread_t *p_intf )
else
else
playlist_Play
(
p_playlist
);
playlist_Play
(
p_playlist
);
vlc_object_release
(
p_playlist
);
pl_Release
(
p_intf
);
}
}
/****************************************************************************
/****************************************************************************
...
...
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