diff --git a/doc/APIchanges b/doc/APIchanges index 206796e14cd1830c1e2e87bd6573ba62408b9afc..1ec6fbc189a413fc5af321e34684a184642e4d36 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -12,6 +12,10 @@ libavutil: 2015-08-28 API changes, most recent first: + +2015-11-xx - xxxxxxx - lavf 57.1.0 - avformat.h + Add av_stream_new_side_data(). + 2015-11-xx - xxxxxxx - lavu 55.3.0 - xtea.h Add av_xtea_le_init and av_xtea_le_crypt diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 57fcbf568baf3fa9b7618156d7c1751f6d5608dc..cd53420215fbedbafa2b1ffe4f423c1aff1c3590 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1343,6 +1343,16 @@ const AVClass *avformat_get_class(void); */ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); +/** + * Allocate new information from stream. + * + * @param stream stream + * @param type desired side information type + * @param size side information size + * @return pointer to fresh allocated data or NULL otherwise + */ +uint8_t *av_stream_new_side_data(AVStream *stream, + enum AVPacketSideDataType type, int size); /** * Get side information from stream. * diff --git a/libavformat/internal.h b/libavformat/internal.h index 7bbf7755cf04ad373af1e69df311a54473f1b9f1..17c45f6dab99f182104db7657b6fa6e3a50dc237 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -419,11 +419,4 @@ static inline int ff_rename(const char *oldpath, const char *newpath) return 0; } -/** - * Add new side data to a stream. If a side data of this type already exists, it - * is replaced. - */ -uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type, - int size); - #endif /* AVFORMAT_INTERNAL_H */ diff --git a/libavformat/mov.c b/libavformat/mov.c index c7495772febeb7f501b7435817cee149de851824..aaf1c2db9a1909dd7f1d73fae84d455891a3122b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -684,7 +684,7 @@ static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; st = c->fc->streams[c->fc->nb_streams-1]; - ast = (enum AVAudioServiceType*)ff_stream_new_side_data(st, AV_PKT_DATA_AUDIO_SERVICE_TYPE, + ast = (enum AVAudioServiceType*)av_stream_new_side_data(st, AV_PKT_DATA_AUDIO_SERVICE_TYPE, sizeof(*ast)); if (!ast) return AVERROR(ENOMEM); @@ -716,7 +716,7 @@ static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; st = c->fc->streams[c->fc->nb_streams-1]; - ast = (enum AVAudioServiceType*)ff_stream_new_side_data(st, AV_PKT_DATA_AUDIO_SERVICE_TYPE, + ast = (enum AVAudioServiceType*)av_stream_new_side_data(st, AV_PKT_DATA_AUDIO_SERVICE_TYPE, sizeof(*ast)); if (!ast) return AVERROR(ENOMEM); diff --git a/libavformat/replaygain.c b/libavformat/replaygain.c index 98e7aad81bc7c293426e342b9ac741af74c3b69a..3188b1503b28ef3cc1471bd7e94c4cb8890f6841 100644 --- a/libavformat/replaygain.c +++ b/libavformat/replaygain.c @@ -75,7 +75,7 @@ int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp, if (tg == INT32_MIN && ag == INT32_MIN) return 0; - replaygain = (AVReplayGain*)ff_stream_new_side_data(st, AV_PKT_DATA_REPLAYGAIN, + replaygain = (AVReplayGain*)av_stream_new_side_data(st, AV_PKT_DATA_REPLAYGAIN, sizeof(*replaygain)); if (!replaygain) return AVERROR(ENOMEM); diff --git a/libavformat/utils.c b/libavformat/utils.c index bb17b4aedd0b786e1995135bb3abce85b301ae04..18499af8d689a98c7c8f92f8e58ed8f1104f81e9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3140,7 +3140,7 @@ uint8_t *av_stream_get_side_data(AVStream *st, enum AVPacketSideDataType type, return NULL; } -uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type, +uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type, int size) { AVPacketSideData *sd, *tmp; diff --git a/libavformat/version.h b/libavformat/version.h index d004a55ad200d8569c03d29dd538f08519f95f0c..ce367dc6ca0dd4a8472da3300fa23c466f8da3f2 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFORMAT_VERSION_MAJOR 57 -#define LIBAVFORMAT_VERSION_MINOR 0 +#define LIBAVFORMAT_VERSION_MINOR 1 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \