Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b39b0623
Commit
b39b0623
authored
Jun 05, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AVOptions: add av_opt_free convenience function.
parent
92b4abc2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
APIchanges
doc/APIchanges
+3
-0
avutil.h
libavutil/avutil.h
+1
-1
opt.c
libavutil/opt.c
+8
-0
opt.h
libavutil/opt.h
+5
-0
No files found.
doc/APIchanges
View file @
b39b0623
...
...
@@ -13,6 +13,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-06-xx - xxxxxxx - lavu 51.3.0 - opt.h
Add av_opt_free convenience function.
2011-05-28 - 0420bd7 - lavu 51.2.0 - pixdesc.h
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
...
...
libavutil/avutil.h
View file @
b39b0623
...
...
@@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR
2
#define LIBAVUTIL_VERSION_MINOR
3
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
libavutil/opt.c
View file @
b39b0623
...
...
@@ -520,6 +520,14 @@ int av_set_options_string(void *ctx, const char *opts,
return
count
;
}
void
av_opt_free
(
void
*
obj
)
{
const
AVOption
*
o
=
NULL
;
while
((
o
=
av_next_option
(
obj
,
o
)))
if
(
o
->
type
==
FF_OPT_TYPE_STRING
||
o
->
type
==
FF_OPT_TYPE_BINARY
)
av_freep
((
uint8_t
*
)
obj
+
o
->
offset
);
}
#ifdef TEST
#undef printf
...
...
libavutil/opt.h
View file @
b39b0623
...
...
@@ -176,4 +176,9 @@ void av_opt_set_defaults2(void *s, int mask, int flags);
int
av_set_options_string
(
void
*
ctx
,
const
char
*
opts
,
const
char
*
key_val_sep
,
const
char
*
pairs_sep
);
/**
* Free all string and binary options in obj.
*/
void
av_opt_free
(
void
*
obj
);
#endif
/* AVUTIL_OPT_H */
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