Commit ad317c94 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit '7f4ec436'

* commit '7f4ec436':
  avformat: expose av_stream_new_side_data helper

  Conflicts:
      libavformat/internal.h
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 2bf93dfd 7f4ec436
...@@ -14,6 +14,9 @@ libavutil: 2015-08-28 ...@@ -14,6 +14,9 @@ libavutil: 2015-08-28
API changes, most recent first: API changes, most recent first:
2015-11-xx - xxxxxxx - lavf 57.19.100 - avformat.h
Add av_stream_new_side_data().
2015-11-xx - xxxxxxx - lavu 55.8.100 - xtea.h 2015-11-xx - xxxxxxx - lavu 55.8.100 - xtea.h
Add av_xtea_le_init and av_xtea_le_crypt Add av_xtea_le_init and av_xtea_le_crypt
......
...@@ -1939,6 +1939,16 @@ const AVClass *avformat_get_class(void); ...@@ -1939,6 +1939,16 @@ const AVClass *avformat_get_class(void);
*/ */
AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); 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. * Get side information from stream.
* *
......
...@@ -467,13 +467,6 @@ static inline int ff_rename(const char *oldpath, const char *newpath, void *logc ...@@ -467,13 +467,6 @@ static inline int ff_rename(const char *oldpath, const char *newpath, void *logc
return ret; return ret;
} }
/**
* 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);
/** /**
* Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end
* which is always set to 0. * which is always set to 0.
......
...@@ -724,7 +724,7 @@ static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -724,7 +724,7 @@ static int mov_read_dac3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return 0; return 0;
st = c->fc->streams[c->fc->nb_streams-1]; 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)); sizeof(*ast));
if (!ast) if (!ast)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
...@@ -756,7 +756,7 @@ static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -756,7 +756,7 @@ static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return 0; return 0;
st = c->fc->streams[c->fc->nb_streams-1]; 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)); sizeof(*ast));
if (!ast) if (!ast)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
...@@ -75,7 +75,7 @@ int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp, ...@@ -75,7 +75,7 @@ int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp,
if (tg == INT32_MIN && ag == INT32_MIN) if (tg == INT32_MIN && ag == INT32_MIN)
return 0; 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)); sizeof(*replaygain));
if (!replaygain) if (!replaygain)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
......
...@@ -4594,7 +4594,7 @@ uint8_t *av_stream_get_side_data(AVStream *st, enum AVPacketSideDataType type, ...@@ -4594,7 +4594,7 @@ uint8_t *av_stream_get_side_data(AVStream *st, enum AVPacketSideDataType type,
return NULL; 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) int size)
{ {
AVPacketSideData *sd, *tmp; AVPacketSideData *sd, *tmp;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 57 #define LIBAVFORMAT_VERSION_MAJOR 57
#define LIBAVFORMAT_VERSION_MINOR 18 #define LIBAVFORMAT_VERSION_MINOR 19
#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_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