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
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 * );
static
int
BinaryLog
(
uint32_t
);
static
void
MaskToShift
(
int
*
,
int
*
,
uint32_t
);
static
void
vout_Destructor
(
vlc_object_t
*
p_this
);
/* Object variables callbacks */
static
int
DeinterlaceCallback
(
vlc_object_t
*
,
char
const
*
,
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,
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
spu_Attach
(
p_vout
->
p_spu
,
p_this
,
VLC_FALSE
);
vlc_object_detach
(
p_vout
);
vlc_object_attach
(
p_vout
,
p_
playlist
);
vlc_object_attach
(
p_vout
,
p_
this
);
pl_Release
(
p_this
);
}
return
NULL
;
...
...
@@ -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"
);
module_Unneed
(
p_vout
,
p_vout
->
p_module
);
vlc_object_detach
(
p_vout
);
vlc_object_release
(
p_vout
);
return
NULL
;
}
...
...
@@ -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"
);
/* 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
);
return
NULL
;
}
vlc_object_set_destructor
(
p_vout
,
vout_Destructor
);
return
p_vout
;
}
...
...
@@ -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
)
{
vout_thread_t
*
p_another_vout
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_vout
);
/* XXX: should go in the destructor */
var_Destroy
(
p_vout
,
"intf-change"
);
/* Request thread destruction */
vlc_object_kill
(
p_vout
);
vlc_thread_join
(
p_vout
);
vlc_object_release
(
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
);
config_ChainDestroy
(
p_vout
->
p_cfg
);
/* Free structure */
vlc_object_release
(
p_vout
);
#ifndef __APPLE__
/* 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,
...
...
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