Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5d8c765a
Commit
5d8c765a
authored
Jun 28, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/input/control.c: fixed INPUT_ADD_INFO/INPUT_GET_INFO
parent
d469b20d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
src/input/control.c
src/input/control.c
+11
-7
No files found.
src/input/control.c
View file @
5d8c765a
...
@@ -138,15 +138,17 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
...
@@ -138,15 +138,17 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
for
(
i
=
0
;
i
<
p_input
->
input
.
p_item
->
i_categories
;
i
++
)
for
(
i
=
0
;
i
<
p_input
->
input
.
p_item
->
i_categories
;
i
++
)
{
{
if
(
!
strcmp
(
p_input
->
input
.
p_item
->
pp_categories
[
i
]
->
psz_name
,
if
(
!
strcmp
(
p_input
->
input
.
p_item
->
pp_categories
[
i
]
->
psz_name
,
psz_cat
)
)
psz_cat
)
)
break
;
return
VLC_EGENERIC
;
}
}
if
(
i
==
p_input
->
input
.
p_item
->
i_categories
)
if
(
i
==
p_input
->
input
.
p_item
->
i_categories
)
{
{
p_cat
=
malloc
(
sizeof
(
info_category_t
)
);
p_cat
=
malloc
(
sizeof
(
info_category_t
)
);
if
(
!
p_cat
)
if
(
!
p_cat
)
{
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
p_cat
->
psz_name
=
strdup
(
psz_cat
);
p_cat
->
psz_name
=
strdup
(
psz_cat
);
p_cat
->
i_infos
=
0
;
p_cat
->
i_infos
=
0
;
p_cat
->
pp_infos
=
NULL
;
p_cat
->
pp_infos
=
NULL
;
...
@@ -163,7 +165,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
...
@@ -163,7 +165,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
{
{
if
(
p_cat
->
pp_infos
[
i
]
->
psz_value
)
if
(
p_cat
->
pp_infos
[
i
]
->
psz_value
)
free
(
p_cat
->
pp_infos
[
i
]
->
psz_value
);
free
(
p_cat
->
pp_infos
[
i
]
->
psz_value
);
return
VLC_EGENERIC
;
break
;
}
}
}
}
...
@@ -171,7 +173,11 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
...
@@ -171,7 +173,11 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
{
{
p_info
=
malloc
(
sizeof
(
info_t
)
);
p_info
=
malloc
(
sizeof
(
info_t
)
);
if
(
!
p_info
)
if
(
!
p_info
)
{
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
INSERT_ELEM
(
p_cat
->
pp_infos
,
p_cat
->
i_infos
,
INSERT_ELEM
(
p_cat
->
pp_infos
,
p_cat
->
i_infos
,
p_cat
->
i_infos
,
p_info
);
p_cat
->
i_infos
,
p_info
);
p_info
->
psz_name
=
strdup
(
psz_name
);
p_info
->
psz_name
=
strdup
(
psz_name
);
...
@@ -199,8 +205,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
...
@@ -199,8 +205,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
for
(
i
=
0
;
i
<
p_input
->
input
.
p_item
->
i_categories
;
i
++
)
for
(
i
=
0
;
i
<
p_input
->
input
.
p_item
->
i_categories
;
i
++
)
{
{
if
(
!
strcmp
(
p_input
->
input
.
p_item
->
pp_categories
[
i
]
->
psz_name
,
if
(
!
strcmp
(
p_input
->
input
.
p_item
->
pp_categories
[
i
]
->
psz_name
,
psz_cat
)
)
psz_cat
)
)
break
;
return
VLC_EGENERIC
;
}
}
if
(
i
!=
p_input
->
input
.
p_item
->
i_categories
)
if
(
i
!=
p_input
->
input
.
p_item
->
i_categories
)
...
@@ -229,8 +234,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
...
@@ -229,8 +234,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
{
{
char
*
psz_name
=
(
char
*
)
va_arg
(
args
,
char
*
);
char
*
psz_name
=
(
char
*
)
va_arg
(
args
,
char
*
);
if
(
!
psz_name
)
if
(
!
psz_name
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
vlc_mutex_lock
(
&
p_input
->
input
.
p_item
->
lock
);
if
(
p_input
->
input
.
p_item
->
psz_name
)
if
(
p_input
->
input
.
p_item
->
psz_name
)
...
...
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