Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
f9810be5
Commit
f9810be5
authored
May 18, 2024
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fftools: move check_avoptions and remove_avoptions to cmdutils
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
169b6ee7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
23 deletions
+26
-23
cmdutils.c
fftools/cmdutils.c
+20
-0
cmdutils.h
fftools/cmdutils.h
+6
-0
ffmpeg.c
fftools/ffmpeg.c
+0
-20
ffmpeg.h
fftools/ffmpeg.h
+0
-3
No files found.
fftools/cmdutils.c
View file @
f9810be5
...
...
@@ -1146,3 +1146,23 @@ char *file_read(const char *filename)
return
NULL
;
return
str
;
}
void
remove_avoptions
(
AVDictionary
**
a
,
AVDictionary
*
b
)
{
const
AVDictionaryEntry
*
t
=
NULL
;
while
((
t
=
av_dict_iterate
(
b
,
t
)))
{
av_dict_set
(
a
,
t
->
key
,
NULL
,
AV_DICT_MATCH_CASE
);
}
}
int
check_avoptions
(
AVDictionary
*
m
)
{
const
AVDictionaryEntry
*
t
=
av_dict_iterate
(
m
,
NULL
);
if
(
t
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Option %s not found.
\n
"
,
t
->
key
);
return
AVERROR_OPTION_NOT_FOUND
;
}
return
0
;
}
fftools/cmdutils.h
View file @
f9810be5
...
...
@@ -483,4 +483,10 @@ double get_rotation(const int32_t *displaymatrix);
/* read file contents into a string */
char
*
file_read
(
const
char
*
filename
);
/* Remove keys in dictionary b from dictionary a */
void
remove_avoptions
(
AVDictionary
**
a
,
AVDictionary
*
b
);
/* Check if any keys exist in dictionary m */
int
check_avoptions
(
AVDictionary
*
m
);
#endif
/* FFTOOLS_CMDUTILS_H */
fftools/ffmpeg.c
View file @
f9810be5
...
...
@@ -473,26 +473,6 @@ const FrameData *packet_data_c(AVPacket *pkt)
return
ret
<
0
?
NULL
:
(
const
FrameData
*
)
pkt
->
opaque_ref
->
data
;
}
void
remove_avoptions
(
AVDictionary
**
a
,
AVDictionary
*
b
)
{
const
AVDictionaryEntry
*
t
=
NULL
;
while
((
t
=
av_dict_iterate
(
b
,
t
)))
{
av_dict_set
(
a
,
t
->
key
,
NULL
,
AV_DICT_MATCH_CASE
);
}
}
int
check_avoptions
(
AVDictionary
*
m
)
{
const
AVDictionaryEntry
*
t
=
av_dict_iterate
(
m
,
NULL
);
if
(
t
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"Option %s not found.
\n
"
,
t
->
key
);
return
AVERROR_OPTION_NOT_FOUND
;
}
return
0
;
}
void
update_benchmark
(
const
char
*
fmt
,
...)
{
if
(
do_benchmark_all
)
{
...
...
fftools/ffmpeg.h
View file @
f9810be5
...
...
@@ -710,9 +710,6 @@ void term_exit(void);
void
show_usage
(
void
);
void
remove_avoptions
(
AVDictionary
**
a
,
AVDictionary
*
b
);
int
check_avoptions
(
AVDictionary
*
m
);
int
assert_file_overwrite
(
const
char
*
filename
);
AVDictionary
*
strip_specifiers
(
const
AVDictionary
*
dict
);
int
find_codec
(
void
*
logctx
,
const
char
*
name
,
...
...
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