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
7c853ff7
Commit
7c853ff7
authored
Jun 29, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partially fix data leaks when vout creation fails.
Could someone with good vout knowledge review this commit ?
parent
6b47943a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/video_output/video_output.c
src/video_output/video_output.c
+7
-5
No files found.
src/video_output/video_output.c
View file @
7c853ff7
...
...
@@ -450,17 +450,17 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
return
NULL
;
}
vlc_object_set_destructor
(
p_vout
,
vout_Destructor
);
if
(
p_vout
->
b_error
)
{
msg_Err
(
p_vout
,
"video output creation failed"
);
/* Make sure the thread is destroyed */
/* Make sure the thread is destroyed
and data released
*/
vlc_object_release
(
p_vout
);
return
NULL
;
}
vlc_object_set_destructor
(
p_vout
,
vout_Destructor
);
return
p_vout
;
}
...
...
@@ -679,7 +679,8 @@ static int InitThread( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"no chroma module for %4.4s to %4.4s"
,
(
char
*
)
&
p_vout
->
render
.
i_chroma
,
(
char
*
)
&
p_vout
->
output
.
i_chroma
);
vlc_object_detach
(
p_vout
->
p_chroma
);
vlc_object_release
(
p_vout
->
p_chroma
);
p_vout
->
p_chroma
=
NULL
;
p_vout
->
pf_end
(
p_vout
);
vlc_mutex_unlock
(
&
p_vout
->
change_lock
);
...
...
@@ -1086,6 +1087,7 @@ static void RunThread( vout_thread_t *p_vout)
/* A fatal error occurred, and the thread must terminate
* immediately, without displaying anything - setting b_error to 1
* causes the immediate end of the main while() loop. */
// FIXME pf_end
p_vout
->
b_error
=
1
;
}
...
...
@@ -1245,7 +1247,7 @@ static void EndThread( vout_thread_t *p_vout )
/* Destroy the video filters2 */
filter_chain_Delete
(
p_vout
->
p_vf2_chain
);
/* Destroy translation tables */
/* Destroy translation tables
FIXME if b_error is set, it can already be done
*/
p_vout
->
pf_end
(
p_vout
);
/* Release the change lock */
...
...
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