Commit 3e1f2413 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'd161ae0a'

* commit 'd161ae0a':
  frame: add a function for removing side data from a frame

Conflicts:
	libavutil/version.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 82e6660a d161ae0a
......@@ -15,6 +15,10 @@ libavutil: 2012-10-22
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.
......
......@@ -642,3 +642,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--;
}
}
}
......@@ -730,6 +730,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);
/**
* @}
*/
......
......@@ -56,7 +56,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 68
#define LIBAVUTIL_VERSION_MINOR 69
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment