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
05c786b6
Commit
05c786b6
authored
Mar 17, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/video_output/vout_intf.c: small cleanup.
parent
39f890d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+16
-8
No files found.
src/video_output/vout_intf.c
View file @
05c786b6
...
...
@@ -269,12 +269,14 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
free
(
val
.
psz_string
);
val
.
psz_string
=
0
;
}
#ifdef SYS_DARWIN
if
(
!
val
.
psz_string
&&
p_vout
->
p_vlc
->
psz_homedir
)
{
asprintf
(
&
val
.
psz_string
,
"%s/Desktop"
,
p_vout
->
p_vlc
->
psz_homedir
);
}
#elif defined(WIN32) && !defined(UNDER_CE)
if
(
!
val
.
psz_string
&&
p_vout
->
p_vlc
->
psz_homedir
)
{
...
...
@@ -301,11 +303,11 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
{
SHGetFolderPath
=
(
void
*
)
GetProcAddress
(
shfolder_dll
,
_T
(
"SHGetFolderPathA"
)
);
if
(
SHGetFolderPath
!=
NULL
)
if
(
SHGetFolderPath
!=
NULL
)
{
p_mypicturesdir
=
(
char
*
)
malloc
(
MAX_PATH
);
if
(
p_mypicturesdir
)
{
{
if
(
S_OK
!=
SHGetFolderPath
(
NULL
,
CSIDL_MYPICTURES
|
CSIDL_FLAG_CREATE
,
...
...
@@ -320,14 +322,18 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
FreeLibrary
(
shfolder_dll
);
}
if
(
p_mypicturesdir
==
NULL
){
if
(
p_mypicturesdir
==
NULL
)
{
asprintf
(
&
val
.
psz_string
,
"%s/"
CONFIG_DIR
,
p_vout
->
p_vlc
->
psz_homedir
);
}
else
{
p_vout
->
p_vlc
->
psz_homedir
);
}
else
{
asprintf
(
&
val
.
psz_string
,
p_mypicturesdir
);
free
(
p_mypicturesdir
);
}
}
#else
if
(
!
val
.
psz_string
&&
p_vout
->
p_vlc
->
psz_homedir
)
{
...
...
@@ -335,20 +341,22 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
p_vout
->
p_vlc
->
psz_homedir
);
}
#endif
if
(
!
val
.
psz_string
)
{
msg_Err
(
p_vout
,
"no directory specified for snapshots"
);
return
VLC_EGENERIC
;
}
var_Get
(
p_vout
,
"snapshot-format"
,
&
format
);
if
(
format
.
psz_string
&&
!*
format
.
psz_string
)
if
(
!
format
.
psz_string
||
!*
format
.
psz_string
)
{
free
(
format
.
psz_string
);
if
(
format
.
psz_string
)
free
(
format
.
psz_string
);
format
.
psz_string
=
strdup
(
"png"
);
}
asprintf
(
&
psz_filename
,
"%s/vlcsnap-%u.%s"
,
val
.
psz_string
,
(
unsigned
int
)(
p_pic
->
date
/
100000
)
&
0xFFFFFF
,
format
.
psz_string
);
(
unsigned
int
)(
p_pic
->
date
/
100000
)
&
0xFFFFFF
,
format
.
psz_string
);
free
(
val
.
psz_string
);
free
(
format
.
psz_string
);
...
...
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