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
1515
1616 API changes, most recent first:
1717
18+2014-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+
1822 2014-02-xx - xxxxxxx - lavu 53.07.0 - frame.h, replaygain.h
1923 Add AV_FRAME_DATA_REPLAYGAIN for exporting replaygain tags.
2024 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
642642
643643 return AVERROR(EINVAL);
644644 }
645+
646+void 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
730730 AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
731731 enum AVFrameSideDataType type);
732732
733+/**
734+ * If side data of the supplied type exists in the frame, free it and remove it
735+ * from the frame.
736+ */
737+void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type);
738+
733739 /**
734740 * @}
735741 */
libavutil/version.h+1−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
5656 */
5757
5858 #define LIBAVUTIL_VERSION_MAJOR 52
59−#define LIBAVUTIL_VERSION_MINOR 68
59+#define LIBAVUTIL_VERSION_MINOR 69
6060 #define LIBAVUTIL_VERSION_MICRO 100
6161
6262 #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