Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1b30e4f5
Commit
1b30e4f5
authored
May 21, 2011
by
Gianluigi Tiesi
Committed by
Michael Niedermayer
May 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
preset dir for win32
parent
0424e052
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
cmdutils.c
cmdutils.c
+17
-0
cmdutils.h
cmdutils.h
+2
-1
ffmpeg.texi
doc/ffmpeg.texi
+1
-0
No files found.
cmdutils.c
View file @
1b30e4f5
...
...
@@ -849,6 +849,23 @@ FILE *get_preset_file(char *filename, size_t filename_size,
av_strlcpy
(
filename
,
preset_name
,
filename_size
);
f
=
fopen
(
filename
,
"r"
);
}
else
{
#ifdef _WIN32
char
datadir
[
MAX_PATH
],
*
ls
;
base
[
2
]
=
NULL
;
if
(
GetModuleFileNameA
(
GetModuleHandleA
(
NULL
),
datadir
,
sizeof
(
datadir
)
-
1
))
{
for
(
ls
=
datadir
;
ls
<
datadir
+
strlen
(
datadir
);
ls
++
)
if
(
*
ls
==
'\\'
)
*
ls
=
'/'
;
if
(
ls
=
strrchr
(
datadir
,
'/'
))
{
*
ls
=
0
;
strncat
(
datadir
,
"/ffpresets"
,
sizeof
(
datadir
)
-
1
-
strlen
(
datadir
));
base
[
2
]
=
datadir
;
}
}
#endif
for
(
i
=
0
;
i
<
3
&&
!
f
;
i
++
)
{
if
(
!
base
[
i
])
continue
;
...
...
cmdutils.h
View file @
1b30e4f5
...
...
@@ -243,7 +243,8 @@ int read_file(const char *filename, char **bufptr, size_t *size);
* If is_path is non-zero, look for the file in the path preset_name.
* Otherwise search for a file named arg.ffpreset in the directories
* $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined
* at configuration time, in that order. If no such file is found and
* at configuration time or in a "ffpresets" folder along the executable
* on win32, in that order. If no such file is found and
* codec_name is defined, then search for a file named
* codec_name-preset_name.ffpreset in the above-mentioned directories.
*
...
...
doc/ffmpeg.texi
View file @
1b30e4f5
...
...
@@ -816,6 +816,7 @@ following rules:
First ffmpeg searches for a file named @var
{
arg
}
.ffpreset in the
directories @file
{$
FFMPEG
_
DATADIR
}
(
if set
)
, and @file
{$
HOME/.ffmpeg
}
, and in
the datadir defined at configuration time (usually @file
{
PREFIX/share/ffmpeg
}
)
or in a @file
{
ffpresets
}
folder along the executable on win32,
in that order. For example, if the argument is @code
{
libx264-max
}
, it will
search for the file @file
{
libx264-max.ffpreset
}
.
...
...
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