Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
49d423b3
Commit
49d423b3
authored
Nov 16, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua_libs: release the playlist object.
parent
66e29381
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
modules/misc/lua/libs/volume.c
modules/misc/lua/libs/volume.c
+10
-7
No files found.
modules/misc/lua/libs/volume.c
View file @
49d423b3
...
...
@@ -55,7 +55,9 @@ static int vlclua_volume_set( lua_State *L )
playlist_t
*
p_this
=
vlclua_get_playlist_internal
(
L
);
int
i_volume
=
luaL_checkint
(
L
,
1
);
/* Do we need to check that i_volume is in the AOUT_VOLUME_MIN->MAX range?*/
return
vlclua_push_ret
(
L
,
aout_VolumeSet
(
p_this
,
i_volume
)
);
int
i_ret
=
aout_VolumeSet
(
p_this
,
i_volume
);
vlclua_release_playlist_internal
(
p_this
);
return
vlclua_push_ret
(
L
,
i_ret
);
}
static
int
vlclua_volume_get
(
lua_State
*
L
)
...
...
@@ -66,26 +68,27 @@ static int vlclua_volume_get( lua_State *L )
lua_pushnumber
(
L
,
i_volume
);
else
lua_pushnil
(
L
);
vlclua_release_playlist_internal
(
p_this
);
return
1
;
}
static
int
vlclua_volume_up
(
lua_State
*
L
)
{
audio_volume_t
i_volume
;
aout_VolumeUp
(
vlclua_get_playlist_internal
(
L
),
luaL_optint
(
L
,
1
,
1
),
&
i_volume
);
playlist_t
*
p_this
=
vlclua_get_playlist_internal
(
L
);
aout_VolumeUp
(
p_this
,
luaL_optint
(
L
,
1
,
1
),
&
i_volume
);
lua_pushnumber
(
L
,
i_volume
);
vlclua_release_playlist_internal
(
p_this
);
return
1
;
}
static
int
vlclua_volume_down
(
lua_State
*
L
)
{
audio_volume_t
i_volume
;
aout_VolumeDown
(
vlclua_get_playlist_internal
(
L
),
luaL_optint
(
L
,
1
,
1
),
&
i_volume
);
playlist_t
*
p_this
=
vlclua_get_playlist_internal
(
L
);
aout_VolumeDown
(
p_this
,
luaL_optint
(
L
,
1
,
1
),
&
i_volume
);
lua_pushnumber
(
L
,
i_volume
);
vlclua_release_playlist_internal
(
p_this
);
return
1
;
}
...
...
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