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
5efbd6a1
Commit
5efbd6a1
authored
May 20, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential object leak (test the conditions before doing anything).
parent
27edb261
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/control/video.c
src/control/video.c
+10
-10
No files found.
src/control/video.c
View file @
5efbd6a1
...
...
@@ -107,28 +107,28 @@ void
libvlc_video_take_snapshot
(
libvlc_media_player_t
*
p_mi
,
const
char
*
psz_filepath
,
unsigned
int
i_width
,
unsigned
int
i_height
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
input_thread_t
*
p_input_thread
;
/* GetVout will raise the exception for us */
if
(
!
p_vout
)
return
;
vout_thread_t
*
p_vout
;
/* The filepath must be not NULL */
if
(
!
psz_filepath
)
{
libvlc_exception_raise
(
p_e
,
"filepath is null"
);
return
;
}
var_SetInteger
(
p_vout
,
"snapshot-width"
,
i_width
);
var_SetInteger
(
p_vout
,
"snapshot-height"
,
i_height
);
p_input_thread
=
p_mi
->
p_input_thread
;
/* We must have an input */
if
(
!
p_mi
->
p_input_thread
)
{
libvlc_exception_raise
(
p_e
,
"Input does not exist"
);
return
;
}
/* GetVout will raise the exception for us */
p_vout
=
GetVout
(
p_mi
,
p_e
);
if
(
!
p_vout
)
return
;
var_SetInteger
(
p_vout
,
"snapshot-width"
,
i_width
);
var_SetInteger
(
p_vout
,
"snapshot-height"
,
i_height
);
var_SetString
(
p_vout
,
"snapshot-path"
,
psz_filepath
);
var_SetString
(
p_vout
,
"snapshot-format"
,
"png"
);
...
...
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