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
80cd00cb
Commit
80cd00cb
authored
Jun 06, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: remove non-portable function cast
parent
b2b0b663
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
37 deletions
+36
-37
src/input/input.c
src/input/input.c
+36
-37
No files found.
src/input/input.c
View file @
80cd00cb
...
@@ -58,8 +58,6 @@
...
@@ -58,8 +58,6 @@
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
static
void
Destructor
(
input_thread_t
*
p_input
);
static
void
*
Run
(
void
*
);
static
void
*
Run
(
void
*
);
static
input_thread_t
*
Create
(
vlc_object_t
*
,
input_item_t
*
,
static
input_thread_t
*
Create
(
vlc_object_t
*
,
input_item_t
*
,
...
@@ -260,6 +258,41 @@ void input_Close( input_thread_t *p_input )
...
@@ -260,6 +258,41 @@ void input_Close( input_thread_t *p_input )
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
}
}
/**
* Input destructor (called when the object's refcount reaches 0).
*/
static
void
input_Destructor
(
vlc_object_t
*
obj
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
obj
;
#ifndef NDEBUG
char
*
psz_name
=
input_item_GetName
(
p_input
->
p
->
p_item
);
msg_Dbg
(
p_input
,
"Destroying the input for '%s'"
,
psz_name
);
free
(
psz_name
);
#endif
if
(
p_input
->
p
->
p_es_out_display
)
es_out_Delete
(
p_input
->
p
->
p_es_out_display
);
if
(
p_input
->
p
->
p_resource
)
input_resource_Release
(
p_input
->
p
->
p_resource
);
if
(
p_input
->
p
->
p_resource_private
)
input_resource_Release
(
p_input
->
p
->
p_resource_private
);
vlc_gc_decref
(
p_input
->
p
->
p_item
);
vlc_mutex_destroy
(
&
p_input
->
p
->
counters
.
counters_lock
);
for
(
int
i
=
0
;
i
<
p_input
->
p
->
i_control
;
i
++
)
{
input_control_t
*
p_ctrl
=
&
p_input
->
p
->
control
[
i
];
ControlRelease
(
p_ctrl
->
i_type
,
p_ctrl
->
val
);
}
vlc_cond_destroy
(
&
p_input
->
p
->
wait_control
);
vlc_mutex_destroy
(
&
p_input
->
p
->
lock_control
);
free
(
p_input
->
p
);
}
/**
/**
* Get the item from an input thread
* Get the item from an input thread
* FIXME it does not increase ref count of the item.
* FIXME it does not increase ref count of the item.
...
@@ -472,45 +505,11 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
...
@@ -472,45 +505,11 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input
->
p
->
p_es_out
=
NULL
;
p_input
->
p
->
p_es_out
=
NULL
;
/* Set the destructor when we are sure we are initialized */
/* Set the destructor when we are sure we are initialized */
vlc_object_set_destructor
(
p_input
,
(
vlc_destructor_t
)
Destructor
);
vlc_object_set_destructor
(
p_input
,
input_
Destructor
);
return
p_input
;
return
p_input
;
}
}
/**
* Input destructor (called when the object's refcount reaches 0).
*/
static
void
Destructor
(
input_thread_t
*
p_input
)
{
#ifndef NDEBUG
char
*
psz_name
=
input_item_GetName
(
p_input
->
p
->
p_item
);
msg_Dbg
(
p_input
,
"Destroying the input for '%s'"
,
psz_name
);
free
(
psz_name
);
#endif
if
(
p_input
->
p
->
p_es_out_display
)
es_out_Delete
(
p_input
->
p
->
p_es_out_display
);
if
(
p_input
->
p
->
p_resource
)
input_resource_Release
(
p_input
->
p
->
p_resource
);
if
(
p_input
->
p
->
p_resource_private
)
input_resource_Release
(
p_input
->
p
->
p_resource_private
);
vlc_gc_decref
(
p_input
->
p
->
p_item
);
vlc_mutex_destroy
(
&
p_input
->
p
->
counters
.
counters_lock
);
for
(
int
i
=
0
;
i
<
p_input
->
p
->
i_control
;
i
++
)
{
input_control_t
*
p_ctrl
=
&
p_input
->
p
->
control
[
i
];
ControlRelease
(
p_ctrl
->
i_type
,
p_ctrl
->
val
);
}
vlc_cond_destroy
(
&
p_input
->
p
->
wait_control
);
vlc_mutex_destroy
(
&
p_input
->
p
->
lock_control
);
free
(
p_input
->
p
);
}
/*****************************************************************************
/*****************************************************************************
* Run: main thread loop
* Run: main thread loop
* This is the "normal" thread that spawns the input processing chain,
* This is the "normal" thread that spawns the input processing chain,
...
...
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