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
5c9c07f8
Commit
5c9c07f8
authored
Mar 23, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extended INPUT_DEL_INFO (Allow deleting a whole category with NULL name)
Fixed VLC_META_NOW_PLAYING update.
parent
d5c128a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
13 deletions
+35
-13
src/input/control.c
src/input/control.c
+33
-11
src/input/input.c
src/input/input.c
+2
-2
No files found.
src/input/control.c
View file @
5c9c07f8
...
...
@@ -205,15 +205,16 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
char
*
psz_name
=
(
char
*
)
va_arg
(
args
,
char
*
);
info_category_t
*
p_cat
=
NULL
;
int
i_cat
;
int
i
;
vlc_mutex_lock
(
&
p_input
->
p
->
input
.
p_item
->
lock
);
for
(
i
=
0
;
i
<
p_input
->
p
->
input
.
p_item
->
i_categories
;
i
++
)
for
(
i
_cat
=
0
;
i_cat
<
p_input
->
p
->
input
.
p_item
->
i_categories
;
i_cat
++
)
{
if
(
!
strcmp
(
p_input
->
p
->
input
.
p_item
->
pp_categories
[
i
]
->
psz_name
,
if
(
!
strcmp
(
p_input
->
p
->
input
.
p_item
->
pp_categories
[
i
_cat
]
->
psz_name
,
psz_cat
)
)
{
p_cat
=
p_input
->
p
->
input
.
p_item
->
pp_categories
[
i
];
p_cat
=
p_input
->
p
->
input
.
p_item
->
pp_categories
[
i
_cat
];
break
;
}
}
...
...
@@ -223,27 +224,48 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
return
VLC_EGENERIC
;
}
for
(
i
=
0
;
i
<
p_cat
->
i_infos
;
i
++
)
if
(
psz_name
)
{
if
(
!
strcmp
(
p_cat
->
pp_infos
[
i
]
->
psz_name
,
psz_name
)
)
/* Remove a specific info */
for
(
i
=
0
;
i
<
p_cat
->
i_infos
;
i
++
)
{
if
(
!
strcmp
(
p_cat
->
pp_infos
[
i
]
->
psz_name
,
psz_name
)
)
{
free
(
p_cat
->
pp_infos
[
i
]
->
psz_name
);
if
(
p_cat
->
pp_infos
[
i
]
->
psz_value
)
free
(
p_cat
->
pp_infos
[
i
]
->
psz_value
);
free
(
p_cat
->
pp_infos
[
i
]
);
REMOVE_ELEM
(
p_cat
->
pp_infos
,
p_cat
->
i_infos
,
i
);
break
;
}
}
if
(
i
>=
p_cat
->
i_infos
)
{
vlc_mutex_unlock
(
&
p_input
->
p
->
input
.
p_item
->
lock
);
return
VLC_EGENERIC
;
}
}
else
{
/* Remove the complete categorie */
for
(
i
=
0
;
i
<
p_cat
->
i_infos
;
i
++
)
{
free
(
p_cat
->
pp_infos
[
i
]
->
psz_name
);
if
(
p_cat
->
pp_infos
[
i
]
->
psz_value
)
free
(
p_cat
->
pp_infos
[
i
]
->
psz_value
);
free
(
p_cat
->
pp_infos
[
i
]
);
REMOVE_ELEM
(
p_cat
->
pp_infos
,
p_cat
->
i_infos
,
i
);
break
;
}
if
(
p_cat
->
pp_infos
)
free
(
p_cat
->
pp_infos
);
REMOVE_ELEM
(
p_input
->
p
->
input
.
p_item
->
pp_categories
,
p_input
->
p
->
input
.
p_item
->
i_categories
,
i_cat
);
}
vlc_mutex_unlock
(
&
p_input
->
p
->
input
.
p_item
->
lock
);
if
(
i
>=
p_cat
->
i_infos
)
return
VLC_EGENERIC
;
if
(
!
p_input
->
b_preparsing
)
NotifyPlaylist
(
p_input
);
return
VLC_SUCCESS
;
}
return
VLC_SUCCESS
;
case
INPUT_GET_INFO
:
...
...
src/input/input.c
View file @
5c9c07f8
...
...
@@ -253,8 +253,8 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
}
/* Remove 'Now playing' info as it is probably outdated */
input_Control
(
p_input
,
INPUT_DEL_INFO
,
_
(
VLC_META_INFO_CAT
),
VLC_META_NOW_PLAYING
);
/* ? Don't translate as it might has been copied ? */
input_Control
(
p_input
,
INPUT_DEL_INFO
,
_
(
VLC_META_INFO_CAT
),
VLC_META_NOW_PLAYING
);
vlc_meta_SetNowPlaying
(
p_item
->
p_meta
,
NULL
);
/* */
if
(
p_input
->
b_preparsing
)
...
...
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