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
d51440d7
Commit
d51440d7
authored
May 16, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP: try to fix mix of input item IDs and playlist item IDs
parent
98d71a44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
modules/control/http/macro.c
modules/control/http/macro.c
+25
-22
No files found.
modules/control/http/macro.c
View file @
d51440d7
...
...
@@ -353,7 +353,8 @@ static void MacroDo( httpd_file_sys_t *p_args,
}
case
MVLC_DEL
:
{
int
i_item
,
*
p_items
=
NULL
,
i_nb_items
=
0
;
int
*
p_items
=
NULL
;
size_t
i_nb_items
=
0
;
char
item
[
512
];
const
char
*
p_parser
=
p_request
;
...
...
@@ -363,24 +364,25 @@ static void MacroDo( httpd_file_sys_t *p_args,
{
if
(
!*
item
)
continue
;
i_item
=
atoi
(
item
);
i
nt
i
_item
=
atoi
(
item
);
p_items
=
realloc
(
p_items
,
(
i_nb_items
+
1
)
*
sizeof
(
int
)
);
sizeof
(
*
p_items
)
);
p_items
[
i_nb_items
]
=
i_item
;
i_nb_items
++
;
}
if
(
i_nb_items
)
for
(
size_t
i
=
0
;
i
<
i_nb_items
;
i
++
)
{
int
i
;
for
(
i
=
0
;
i
<
i_nb_items
;
i
++
)
{
playlist_item_t
*
p_item
;
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
p_items
[
i
]
);
p_item
=
playlist_ItemGetById
(
p_sys
->
p_playlist
,
p_items
[
i
]
);
if
(
p_item
)
playlist_DeleteFromInput
(
p_sys
->
p_playlist
,
p_items
[
i
],
false
);
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
p_items
[
i
]
);
p_items
[
i
]
=
-
1
;
}
p_item
->
p_input
->
i_id
,
false
);
}
free
(
p_items
);
...
...
@@ -388,10 +390,10 @@ static void MacroDo( httpd_file_sys_t *p_args,
}
case
MVLC_KEEP
:
{
int
i_item
,
*
p_items
=
NULL
,
i_nb_items
=
0
;
int
*
p_items
=
NULL
;
size_t
i_nb_items
=
0
,
i
;
char
item
[
512
];
const
char
*
p_parser
=
p_request
;
int
i
,
j
;
/* Get the list of items to keep */
while
(
(
p_parser
=
...
...
@@ -399,30 +401,31 @@ static void MacroDo( httpd_file_sys_t *p_args,
{
if
(
!*
item
)
continue
;
i_item
=
atoi
(
item
);
i
nt
i
_item
=
atoi
(
item
);
p_items
=
realloc
(
p_items
,
(
i_nb_items
+
1
)
*
sizeof
(
int
)
);
sizeof
(
*
p_items
)
);
p_items
[
i_nb_items
]
=
i_item
;
i_nb_items
++
;
}
for
(
i
=
p_sys
->
p_playlist
->
items
.
i_size
-
1
;
i
>=
0
;
i
--
)
for
(
i
=
0
;
i
<
p_sys
->
p_playlist
->
items
.
i_size
;
i
++
)
{
size_t
j
;
/* Check if the item is in the keep list */
for
(
j
=
0
;
j
<
i_nb_items
;
j
++
)
{
if
(
p_items
[
j
]
==
ARRAY_VAL
(
p_sys
->
p_playlist
->
items
,
i
)
->
i_id
)
ARRAY_VAL
(
p_sys
->
p_playlist
->
items
,
i
)
->
i_id
)
break
;
}
if
(
j
==
i_nb_items
)
{
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
p_sys
->
p_playlist
->
items
.
p_elems
[
i
]
->
i_id
);
playlist_DeleteFromInput
(
p_sys
->
p_playlist
,
p_sys
->
p_playlist
->
items
.
p_elems
[
i
]
->
i_id
,
p_sys
->
p_playlist
->
items
.
p_elems
[
i
]
->
p_input
->
i_id
,
false
);
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
i
);
}
}
...
...
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