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
ff40ba2d
Commit
ff40ba2d
authored
Mar 26, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: Proper vout destruction via the object destructor.
parent
58ee1c53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
src/video_output/video_output.c
src/video_output/video_output.c
+14
-14
No files found.
src/video_output/video_output.c
View file @
ff40ba2d
...
@@ -72,6 +72,8 @@ static void AspectRatio ( int, int *, int * );
...
@@ -72,6 +72,8 @@ static void AspectRatio ( int, int *, int * );
static
int
BinaryLog
(
uint32_t
);
static
int
BinaryLog
(
uint32_t
);
static
void
MaskToShift
(
int
*
,
int
*
,
uint32_t
);
static
void
MaskToShift
(
int
*
,
int
*
,
uint32_t
);
static
void
vout_Destructor
(
vlc_object_t
*
p_this
);
/* Object variables callbacks */
/* Object variables callbacks */
static
int
DeinterlaceCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
DeinterlaceCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
...
@@ -130,7 +132,7 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
...
@@ -130,7 +132,7 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
spu_Attach
(
p_vout
->
p_spu
,
p_this
,
VLC_FALSE
);
spu_Attach
(
p_vout
->
p_spu
,
p_this
,
VLC_FALSE
);
vlc_object_detach
(
p_vout
);
vlc_object_detach
(
p_vout
);
vlc_object_attach
(
p_vout
,
p_
playlist
);
vlc_object_attach
(
p_vout
,
p_
this
);
pl_Release
(
p_this
);
pl_Release
(
p_this
);
}
}
return
NULL
;
return
NULL
;
...
@@ -458,7 +460,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -458,7 +460,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
{
{
msg_Err
(
p_vout
,
"out of memory"
);
msg_Err
(
p_vout
,
"out of memory"
);
module_Unneed
(
p_vout
,
p_vout
->
p_module
);
module_Unneed
(
p_vout
,
p_vout
->
p_module
);
vlc_object_detach
(
p_vout
);
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
return
NULL
;
return
NULL
;
}
}
...
@@ -468,14 +469,12 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -468,14 +469,12 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
msg_Err
(
p_vout
,
"video output creation failed"
);
msg_Err
(
p_vout
,
"video output creation failed"
);
/* Make sure the thread is destroyed */
/* Make sure the thread is destroyed */
vlc_object_kill
(
p_vout
);
vlc_thread_join
(
p_vout
);
vlc_object_detach
(
p_vout
);
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
return
NULL
;
return
NULL
;
}
}
vlc_object_set_destructor
(
p_vout
,
vout_Destructor
);
return
p_vout
;
return
p_vout
;
}
}
...
@@ -489,21 +488,22 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -489,21 +488,22 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
*****************************************************************************/
*****************************************************************************/
void
vout_Destroy
(
vout_thread_t
*
p_vout
)
void
vout_Destroy
(
vout_thread_t
*
p_vout
)
{
{
vout_thread_t
*
p_another_vout
;
/* XXX: should go in the destructor */
playlist_t
*
p_playlist
=
pl_Yield
(
p_vout
);
var_Destroy
(
p_vout
,
"intf-change"
);
/* Request thread destruction */
vlc_object_release
(
p_vout
);
vlc_object_kill
(
p_vout
);
}
vlc_thread_join
(
p_vout
);
var_Destroy
(
p_vout
,
"intf-change"
);
static
void
vout_Destructor
(
vlc_object_t
*
p_this
)
{
vout_thread_t
*
p_vout
=
p_this
;
vout_thread_t
*
p_another_vout
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_vout
);
free
(
p_vout
->
psz_filter_chain
);
free
(
p_vout
->
psz_filter_chain
);
config_ChainDestroy
(
p_vout
->
p_cfg
);
config_ChainDestroy
(
p_vout
->
p_cfg
);
/* Free structure */
vlc_object_release
(
p_vout
);
#ifndef __APPLE__
#ifndef __APPLE__
/* This is a dirty hack for mostly Linux, where there is no way to get the GUI
/* This is a dirty hack for mostly Linux, where there is no way to get the GUI
back if you closed it while playing video. This is solved in Mac OS X,
back if you closed it while playing video. This is solved in Mac OS X,
...
...
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