* commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5': frame: add a function for removing side data from a frame Conflicts: libavutil/version.h
Unified · Split
| @@ -15,6 +15,10 @@ libavutil: 2012-10-22 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 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 | + | |
| 18 | 22 | 2014-02-xx - xxxxxxx - lavu 53.07.0 - frame.h, replaygain.h |
| 19 | 23 | Add AV_FRAME_DATA_REPLAYGAIN for exporting replaygain tags. |
| 20 | 24 | Add a new header replaygain.h with the AVReplayGain struct. |
| @@ -642,3 +642,19 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src) · 641 unmodified lines | ||
| 642 | 642 | |
| 643 | 643 | return AVERROR(EINVAL); |
| 644 | 644 | } |
| 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 | +} | |
| @@ -730,6 +730,12 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame, · 729 unmodified lines | ||
| 730 | 730 | AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, |
| 731 | 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 | + */ | |
| 737 | +void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type); | |
| 738 | + | |
| 733 | 739 | /** |
| 734 | 740 | * @} |
| 735 | 741 | */ |
| @@ -56,7 +56,7 @@ · 55 unmodified lines | ||
| 56 | 56 | */ |
| 57 | 57 | |
| 58 | 58 | #define LIBAVUTIL_VERSION_MAJOR 52 |
| 59 | −#define LIBAVUTIL_VERSION_MINOR 68 | |
| 59 | +#define LIBAVUTIL_VERSION_MINOR 69 | |
| 60 | 60 | #define LIBAVUTIL_VERSION_MICRO 100 |
| 61 | 61 | |
| 62 | 62 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |