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
208d9042
Commit
208d9042
authored
Aug 30, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use stat rather than fopen+fclose to check if file exists
(cherry picked from commit
475d7593
)
parent
3945f1c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+5
-2
No files found.
src/video_output/vout_intf.c
View file @
208d9042
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
/* free() */
#include <stdlib.h>
/* free() */
#include <sys/types.h>
/* opendir() */
#include <sys/types.h>
/* opendir() */
#include <sys/stat.h>
#include <dirent.h>
/* opendir() */
#include <dirent.h>
/* opendir() */
#include <assert.h>
#include <assert.h>
...
@@ -659,7 +660,8 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -659,7 +660,8 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
if
(
var_GetBool
(
p_vout
,
"snapshot-sequential"
)
==
true
)
if
(
var_GetBool
(
p_vout
,
"snapshot-sequential"
)
==
true
)
{
{
int
i_num
=
var_GetInteger
(
p_vout
,
"snapshot-num"
);
int
i_num
=
var_GetInteger
(
p_vout
,
"snapshot-num"
);
FILE
*
p_file
;
struct
stat
st
;
do
do
{
{
if
(
asprintf
(
&
psz_filename
,
"%s"
DIR_SEP
"%s%05d.%s"
,
if
(
asprintf
(
&
psz_filename
,
"%s"
DIR_SEP
"%s%05d.%s"
,
...
@@ -671,7 +673,8 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -671,7 +673,8 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
}
}
while
(
(
p_file
=
utf8_fopen
(
psz_filename
,
"r"
)
)
&&
!
fclose
(
p_file
)
);
while
(
utf8_stat
(
psz_filename
,
&
st
)
==
0
);
var_SetInteger
(
p_vout
,
"snapshot-num"
,
i_num
);
var_SetInteger
(
p_vout
,
"snapshot-num"
,
i_num
);
}
}
else
else
...
...
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