Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gautam Chitnis
web-ui-redesign
Commits
6b20068d
Commit
6b20068d
authored
Mar 25, 2007
by
Pierre d'Herbemont
Browse files
Gestures: Make sure we that p_playlist is valid, and correctly release p_input and p_playlist.
parent
04ccd548
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/control/gestures.c
View file @
6b20068d
...
...
@@ -166,11 +166,6 @@ static void RunIntf( intf_thread_t *p_intf )
{
playlist_t
*
p_playlist
=
NULL
;
vlc_mutex_lock
(
&
p_intf
->
change_lock
);
p_intf
->
p_sys
->
p_vout
=
NULL
;
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
if
(
InitThread
(
p_intf
)
<
0
)
{
msg_Err
(
p_intf
,
"can't initialize interface thread"
);
...
...
@@ -227,6 +222,9 @@ static void RunIntf( intf_thread_t *p_intf )
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
!
p_playlist
)
break
;
p_input
=
input_from_playlist
(
p_playlist
);
if
(
!
p_input
)
...
...
@@ -324,12 +322,16 @@ static void RunIntf( intf_thread_t *p_intf )
i_count
=
list
.
p_list
->
i_count
;
if
(
i_count
<=
1
)
{
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
continue
;
}
for
(
i
=
0
;
i
<
i_count
;
i
++
)
{
if
(
val
.
i_int
==
list
.
p_list
->
p_values
[
i
].
i_int
)
{
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
break
;
}
}
...
...
@@ -377,7 +379,6 @@ static void RunIntf( intf_thread_t *p_intf )
vlc_object_release
(
p_playlist
);
break
;
}
var_Get
(
p_input
,
"spu-es"
,
&
val
);
var_Change
(
p_input
,
"spu-es"
,
VLC_VAR_GETCHOICES
,
...
...
@@ -385,12 +386,16 @@ static void RunIntf( intf_thread_t *p_intf )
i_count
=
list
.
p_list
->
i_count
;
if
(
i_count
<=
1
)
{
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
continue
;
}
for
(
i
=
0
;
i
<
i_count
;
i
++
)
{
if
(
val
.
i_int
==
list
.
p_list
->
p_values
[
i
].
i_int
)
{
vlc_object_release
(
p_input
);
vlc_object_release
(
p_playlist
);
break
;
}
}
...
...
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