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
513a8db0
Commit
513a8db0
authored
Sep 20, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the unsafe input item array
parent
08cc2b3a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
60 deletions
+0
-60
include/vlc_input.h
include/vlc_input.h
+0
-4
src/input/item.c
src/input/item.c
+0
-37
src/libvlc.c
src/libvlc.c
+0
-13
src/libvlc.h
src/libvlc.h
+0
-5
src/libvlccore.sym
src/libvlccore.sym
+0
-1
No files found.
include/vlc_input.h
View file @
513a8db0
...
...
@@ -60,7 +60,6 @@ struct input_item_t
{
VLC_GC_MEMBERS
int
i_id
;
/**< Identifier of the item */
libvlc_int_t
*
p_libvlc
;
char
*
psz_name
;
/**< text describing this item */
char
*
psz_uri
;
/**< mrl of this item */
...
...
@@ -187,9 +186,6 @@ VLC_EXPORT(int, input_item_AddInfo, ( input_item_t *p_i, const char *psz_cat, co
VLC_EXPORT
(
input_item_t
*
,
__input_item_NewExt
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
int
,
const
char
*
const
*
,
mtime_t
i_duration
)
);
VLC_EXPORT
(
input_item_t
*
,
input_item_NewWithType
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
e
,
int
,
const
char
*
const
*
,
mtime_t
i_duration
,
int
)
);
#define input_item_GetById(a,b) __input_item_GetById( VLC_OBJECT(a),b )
VLC_EXPORT
(
input_item_t
*
,
__input_item_GetById
,
(
vlc_object_t
*
,
int
)
);
/*****************************************************************************
* Meta data helpers
*****************************************************************************/
...
...
src/input/item.c
View file @
513a8db0
...
...
@@ -370,22 +370,8 @@ char *input_item_GetInfo( input_item_t *p_i,
static
void
input_item_Destroy
(
gc_object_t
*
gc
)
{
input_item_t
*
p_input
=
vlc_priv
(
gc
,
input_item_t
);
libvlc_int_t
*
p_libvlc
=
p_input
->
p_libvlc
;
int
i
;
input_item_Clean
(
p_input
);
/* This is broken. Items must be removed from any table before their
* reference count drops to zero (unless the table is not used, but then
* why have it?). Full point, no buts. -- Courmisch */
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_libvlc
);
vlc_object_lock
(
p_libvlc
);
ARRAY_BSEARCH
(
priv
->
input_items
,
->
i_id
,
int
,
p_input
->
i_id
,
i
);
if
(
i
!=
-
1
)
ARRAY_REMOVE
(
priv
->
input_items
,
i
);
vlc_object_unlock
(
p_libvlc
);
free
(
p_input
);
}
...
...
@@ -489,23 +475,6 @@ int input_item_AddInfo( input_item_t *p_i,
return
p_info
->
psz_value
?
VLC_SUCCESS
:
VLC_ENOMEM
;
}
input_item_t
*
__input_item_GetById
(
vlc_object_t
*
p_obj
,
int
i_id
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_obj
->
p_libvlc
);
input_item_t
*
p_ret
=
NULL
;
int
i
;
vlc_object_lock
(
p_obj
->
p_libvlc
);
ARRAY_BSEARCH
(
priv
->
input_items
,
->
i_id
,
int
,
i_id
,
i
);
if
(
i
!=
-
1
)
p_ret
=
ARRAY_VAL
(
priv
->
input_items
,
i
);
vlc_object_unlock
(
p_obj
->
p_libvlc
);
return
p_ret
;
}
input_item_t
*
__input_item_NewExt
(
vlc_object_t
*
p_obj
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
...
...
@@ -531,12 +500,6 @@ input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
input_item_Init
(
p_obj
,
p_input
);
vlc_gc_init
(
p_input
,
input_item_Destroy
);
p_input
->
p_libvlc
=
p_obj
->
p_libvlc
;
vlc_object_lock
(
p_obj
->
p_libvlc
);
p_input
->
i_id
=
++
priv
->
i_last_input_id
;
ARRAY_APPEND
(
priv
->
input_items
,
p_input
);
vlc_object_unlock
(
p_obj
->
p_libvlc
);
p_input
->
b_fixed_name
=
false
;
...
...
src/libvlc.c
View file @
513a8db0
...
...
@@ -807,10 +807,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
vlc_mutex_init
(
&
p_libvlc
->
p_stats
->
lock
);
priv
->
p_stats_computer
=
NULL
;
/* Init the array that holds every input item */
ARRAY_INIT
(
priv
->
input_items
);
priv
->
i_last_input_id
=
0
;
/*
* Initialize hotkey handling
*/
...
...
@@ -1077,15 +1073,6 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
stats_TimersDumpAll
(
p_libvlc
);
stats_TimersCleanAll
(
p_libvlc
);
bool
b_clean
=
true
;
FOREACH_ARRAY
(
input_item_t
*
p_del
,
priv
->
input_items
)
msg_Err
(
p_libvlc
,
"input item %p has not been deleted properly: name %s"
,
p_del
,
p_del
->
psz_name
?
p_del
->
psz_name
:
"(null)"
);
b_clean
=
false
;
FOREACH_END
();
assert
(
b_clean
);
ARRAY_RESET
(
priv
->
input_items
);
msg_Dbg
(
p_libvlc
,
"removing stats"
);
vlc_mutex_destroy
(
&
p_libvlc
->
p_stats
->
lock
);
FREENULL
(
p_libvlc
->
p_stats
);
...
...
src/libvlc.h
View file @
513a8db0
...
...
@@ -206,11 +206,6 @@ typedef struct libvlc_priv_t
vlc_mutex_t
config_lock
;
///< config file lock
char
*
psz_configfile
;
///< location of config file
/* There is no real reason to keep a list of items, but not to break
* everything, let's keep it */
input_item_array_t
input_items
;
///< Array of all created input items
int
i_last_input_id
;
///< Last id of input item
/* Messages */
msg_bank_t
msg_bank
;
///< The message bank
int
i_verbose
;
///< info messages
...
...
src/libvlccore.sym
View file @
513a8db0
...
...
@@ -160,7 +160,6 @@ input_item_AddOpt
input_item_AddOption
input_item_AddSubItem
input_item_CopyOptions
__input_item_GetById
input_item_GetDuration
input_item_GetInfo
input_item_GetMeta
...
...
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