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
78964d87
Commit
78964d87
authored
Jan 23, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix off-by-one overflow and simplify
parent
4f58d06b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
modules/control/rc.c
modules/control/rc.c
+6
-7
No files found.
modules/control/rc.c
View file @
78964d87
...
@@ -1003,21 +1003,20 @@ static int StateChanged( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -1003,21 +1003,20 @@ static int StateChanged( vlc_object_t *p_this, char const *psz_cmd,
p_playlist
=
vlc_object_find
(
p_input
,
VLC_OBJECT_PLAYLIST
,
FIND_PARENT
);
p_playlist
=
vlc_object_find
(
p_input
,
VLC_OBJECT_PLAYLIST
,
FIND_PARENT
);
if
(
p_playlist
)
if
(
p_playlist
)
{
{
char
cmd
[
5
]
=
""
;
char
cmd
[
6
]
;
switch
(
p_playlist
->
status
.
i_status
)
switch
(
p_playlist
->
status
.
i_status
)
{
{
case
PLAYLIST_STOPPED
:
case
PLAYLIST_STOPPED
:
strncpy
(
&
cmd
[
0
],
"stop"
,
4
);
strcpy
(
cmd
,
"stop"
);
cmd
[
4
]
=
'\0'
;
break
;
break
;
case
PLAYLIST_RUNNING
:
case
PLAYLIST_RUNNING
:
strncpy
(
&
cmd
[
0
],
"play"
,
4
);
strcpy
(
cmd
,
"play"
);
cmd
[
4
]
=
'\0'
;
break
;
break
;
case
PLAYLIST_PAUSED
:
case
PLAYLIST_PAUSED
:
strncpy
(
&
cmd
[
0
],
"pause"
,
5
);
strcpy
(
cmd
,
"pause"
);
cmd
[
5
]
=
'\0'
;
break
;
break
;
default:
cmd
[
0
]
=
'\0'
;
}
/* var_GetInteger( p_input, "state" ) */
}
/* var_GetInteger( p_input, "state" ) */
msg_rc
(
STATUS_CHANGE
"( %s state: %d )"
,
&
cmd
[
0
],
newval
.
i_int
);
msg_rc
(
STATUS_CHANGE
"( %s state: %d )"
,
&
cmd
[
0
],
newval
.
i_int
);
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
...
...
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