Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
04ddaf37
Commit
04ddaf37
authored
Mar 20, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: fix an object leak (+some cleanings)
parent
54d212fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
modules/control/dbus.c
modules/control/dbus.c
+12
-21
No files found.
modules/control/dbus.c
View file @
04ddaf37
...
@@ -335,7 +335,7 @@ DBUS_METHOD( GetCurrentMetadata )
...
@@ -335,7 +335,7 @@ DBUS_METHOD( GetCurrentMetadata )
playlist_t
*
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
playlist_t
*
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
PL_LOCK
;
PL_LOCK
;
playlist_item_t
*
p_item
=
playlist_CurrentPlayingItem
(
p_playlist
);
playlist_item_t
*
p_item
=
playlist_CurrentPlayingItem
(
p_playlist
);
if
(
p_item
)
if
(
p_item
)
GetInputMeta
(
p_item
->
p_input
,
&
args
);
GetInputMeta
(
p_item
->
p_input
,
&
args
);
PL_UNLOCK
;
PL_UNLOCK
;
pl_Release
(
(
vlc_object_t
*
)
p_this
);
pl_Release
(
(
vlc_object_t
*
)
p_this
);
...
@@ -431,9 +431,7 @@ DBUS_METHOD( GetMetadata )
...
@@ -431,9 +431,7 @@ DBUS_METHOD( GetMetadata )
dbus_error_init
(
&
error
);
dbus_error_init
(
&
error
);
dbus_int32_t
i_position
;
dbus_int32_t
i_position
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
PL_LOCK
;
dbus_message_get_args
(
p_from
,
&
error
,
dbus_message_get_args
(
p_from
,
&
error
,
DBUS_TYPE_INT32
,
&
i_position
,
DBUS_TYPE_INT32
,
&
i_position
,
...
@@ -441,14 +439,14 @@ DBUS_METHOD( GetMetadata )
...
@@ -441,14 +439,14 @@ DBUS_METHOD( GetMetadata )
if
(
dbus_error_is_set
(
&
error
)
)
if
(
dbus_error_is_set
(
&
error
)
)
{
{
PL_UNLOCK
;
pl_Release
(
(
vlc_object_t
*
)
p_this
);
msg_Err
(
(
vlc_object_t
*
)
p_this
,
"D-Bus message reading : %s"
,
msg_Err
(
(
vlc_object_t
*
)
p_this
,
"D-Bus message reading : %s"
,
error
.
message
);
error
.
message
);
dbus_error_free
(
&
error
);
dbus_error_free
(
&
error
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
}
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
PL_LOCK
;
if
(
i_position
<
p_playlist
->
current
.
i_size
)
if
(
i_position
<
p_playlist
->
current
.
i_size
)
{
{
GetInputMeta
(
p_playlist
->
current
.
p_elems
[
i_position
]
->
p_input
,
&
args
);
GetInputMeta
(
p_playlist
->
current
.
p_elems
[
i_position
]
->
p_input
,
&
args
);
...
@@ -480,7 +478,7 @@ DBUS_METHOD( DelTrack )
...
@@ -480,7 +478,7 @@ DBUS_METHOD( DelTrack )
dbus_error_init
(
&
error
);
dbus_error_init
(
&
error
);
dbus_int32_t
i_position
;
dbus_int32_t
i_position
;
playlist_t
*
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
)
;
playlist_t
*
p_playlist
;
dbus_message_get_args
(
p_from
,
&
error
,
dbus_message_get_args
(
p_from
,
&
error
,
DBUS_TYPE_INT32
,
&
i_position
,
DBUS_TYPE_INT32
,
&
i_position
,
...
@@ -494,6 +492,7 @@ DBUS_METHOD( DelTrack )
...
@@ -494,6 +492,7 @@ DBUS_METHOD( DelTrack )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
}
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
PL_LOCK
;
PL_LOCK
;
if
(
i_position
<
p_playlist
->
current
.
i_size
)
if
(
i_position
<
p_playlist
->
current
.
i_size
)
{
{
...
@@ -515,8 +514,7 @@ DBUS_METHOD( SetLoop )
...
@@ -515,8 +514,7 @@ DBUS_METHOD( SetLoop )
DBusError
error
;
DBusError
error
;
dbus_bool_t
b_loop
;
dbus_bool_t
b_loop
;
vlc_value_t
val
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
=
NULL
;
dbus_error_init
(
&
error
);
dbus_error_init
(
&
error
);
dbus_message_get_args
(
p_from
,
&
error
,
dbus_message_get_args
(
p_from
,
&
error
,
...
@@ -531,9 +529,8 @@ DBUS_METHOD( SetLoop )
...
@@ -531,9 +529,8 @@ DBUS_METHOD( SetLoop )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
}
val
.
b_bool
=
(
b_loop
==
TRUE
)
?
true
:
false
;
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
var_Set
(
p_playlist
,
"loop"
,
val
);
var_Set
Bool
(
p_playlist
,
"loop"
,
(
b_loop
==
TRUE
)
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
REPLY_SEND
;
...
@@ -546,8 +543,7 @@ DBUS_METHOD( Repeat )
...
@@ -546,8 +543,7 @@ DBUS_METHOD( Repeat )
DBusError
error
;
DBusError
error
;
dbus_bool_t
b_repeat
;
dbus_bool_t
b_repeat
;
vlc_value_t
val
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
=
NULL
;
dbus_error_init
(
&
error
);
dbus_error_init
(
&
error
);
dbus_message_get_args
(
p_from
,
&
error
,
dbus_message_get_args
(
p_from
,
&
error
,
...
@@ -562,10 +558,8 @@ DBUS_METHOD( Repeat )
...
@@ -562,10 +558,8 @@ DBUS_METHOD( Repeat )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
}
val
.
b_bool
=
(
b_repeat
==
TRUE
)
?
true
:
false
;
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
var_Set
(
p_playlist
,
"repeat"
,
val
);
var_Set
Bool
(
p_playlist
,
"repeat"
,
(
b_repeat
==
TRUE
)
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
REPLY_SEND
;
...
@@ -578,8 +572,7 @@ DBUS_METHOD( SetRandom )
...
@@ -578,8 +572,7 @@ DBUS_METHOD( SetRandom )
DBusError
error
;
DBusError
error
;
dbus_bool_t
b_random
;
dbus_bool_t
b_random
;
vlc_value_t
val
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
=
NULL
;
dbus_error_init
(
&
error
);
dbus_error_init
(
&
error
);
dbus_message_get_args
(
p_from
,
&
error
,
dbus_message_get_args
(
p_from
,
&
error
,
...
@@ -594,10 +587,8 @@ DBUS_METHOD( SetRandom )
...
@@ -594,10 +587,8 @@ DBUS_METHOD( SetRandom )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
}
val
.
b_bool
=
(
b_random
==
TRUE
)
?
true
:
false
;
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
p_playlist
=
pl_Hold
(
(
vlc_object_t
*
)
p_this
);
var_Set
(
p_playlist
,
"random"
,
val
);
var_Set
Bool
(
p_playlist
,
"random"
,
(
b_random
==
TRUE
)
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
REPLY_SEND
;
...
...
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