History

Merge commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5'

* commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5': frame: add a function for removing side data from a frame Conflicts: libavutil/version.h

Michael Niedermayer committed 12 years ago

Commit 3e1f2412 parents 82e6660 d161ae04 files · +27 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavutil/frame.c +16 −0
  3. libavutil/frame.h +6 −0
  4. libavutil/version.h +1 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2012-10-22 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182014-02-xx - xxxxxxx - lavu 53.08.0 - frame.h
19 Add av_frame_remove_side_data() for removing a single side data
20 instance from a frame.
21
182014-02-xx - xxxxxxx - lavu 53.07.0 - frame.h, replaygain.h222014-02-xx - xxxxxxx - lavu 53.07.0 - frame.h, replaygain.h
19 Add AV_FRAME_DATA_REPLAYGAIN for exporting replaygain tags.23 Add AV_FRAME_DATA_REPLAYGAIN for exporting replaygain tags.
20 Add a new header replaygain.h with the AVReplayGain struct.24 Add a new header replaygain.h with the AVReplayGain struct.
libavutil/frame.c+16−0
@@ -642,3 +642,19 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src) · 641 unmodified lines
642 642
643 return AVERROR(EINVAL);643 return AVERROR(EINVAL);
644}644}
645
646void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
647{
648 int i;
649
650 for (i = 0; i < frame->nb_side_data; i++) {
651 AVFrameSideData *sd = frame->side_data[i];
652 if (sd->type == type) {
653 av_freep(&sd->data);
654 av_dict_free(&sd->metadata);
655 av_freep(&frame->side_data[i]);
656 frame->side_data[i] = frame->side_data[frame->nb_side_data - 1];
657 frame->nb_side_data--;
658 }
659 }
660}
libavutil/frame.h+6−0
@@ -730,6 +730,12 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame, · 729 unmodified lines
730AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,730AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
731 enum AVFrameSideDataType type);731 enum AVFrameSideDataType type);
732 732
733/**
734 * If side data of the supplied type exists in the frame, free it and remove it
735 * from the frame.
736 */
737void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type);
738
733/**739/**
734 * @}740 * @}
735 */741 */
libavutil/version.h+1−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
56 */56 */
57 57
58#define LIBAVUTIL_VERSION_MAJOR 5258#define LIBAVUTIL_VERSION_MAJOR 52
59#define LIBAVUTIL_VERSION_MINOR 6859#define LIBAVUTIL_VERSION_MINOR 69
60#define LIBAVUTIL_VERSION_MICRO 10060#define LIBAVUTIL_VERSION_MICRO 100
61 61
62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t