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
d161ae0a
Commit
d161ae0a
authored
Feb 19, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frame: add a function for removing side data from a frame
parent
59444c76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
APIchanges
doc/APIchanges
+4
-0
frame.c
libavutil/frame.c
+16
-0
frame.h
libavutil/frame.h
+6
-0
version.h
libavutil/version.h
+1
-1
No files found.
doc/APIchanges
View file @
d161ae0a
...
...
@@ -13,6 +13,10 @@ libavutil: 2013-12-xx
API changes, most recent first:
2014-02-xx - xxxxxxx - lavu 53.08.0 - frame.h
Add av_frame_remove_side_data() for removing a single side data
instance from a frame.
2014-02-xx - xxxxxxx - lavu 53.07.0 - frame.h, replaygain.h
Add AV_FRAME_DATA_REPLAYGAIN for exporting replaygain tags.
Add a new header replaygain.h with the AVReplayGain struct.
...
...
libavutil/frame.c
View file @
d161ae0a
...
...
@@ -526,3 +526,19 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src)
return
AVERROR
(
EINVAL
);
}
void
av_frame_remove_side_data
(
AVFrame
*
frame
,
enum
AVFrameSideDataType
type
)
{
int
i
;
for
(
i
=
0
;
i
<
frame
->
nb_side_data
;
i
++
)
{
AVFrameSideData
*
sd
=
frame
->
side_data
[
i
];
if
(
sd
->
type
==
type
)
{
av_freep
(
&
sd
->
data
);
av_dict_free
(
&
sd
->
metadata
);
av_freep
(
&
frame
->
side_data
[
i
]);
frame
->
side_data
[
i
]
=
frame
->
side_data
[
frame
->
nb_side_data
-
1
];
frame
->
nb_side_data
--
;
}
}
}
libavutil/frame.h
View file @
d161ae0a
...
...
@@ -562,6 +562,12 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
AVFrameSideData
*
av_frame_get_side_data
(
const
AVFrame
*
frame
,
enum
AVFrameSideDataType
type
);
/**
* If side data of the supplied type exists in the frame, free it and remove it
* from the frame.
*/
void
av_frame_remove_side_data
(
AVFrame
*
frame
,
enum
AVFrameSideDataType
type
);
/**
* @}
*/
...
...
libavutil/version.h
View file @
d161ae0a
...
...
@@ -54,7 +54,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 53
#define LIBAVUTIL_VERSION_MINOR
7
#define LIBAVUTIL_VERSION_MINOR
8
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
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