diff options
author | Janne Grunau <janne-libav@jannau.net> | 2014-05-19 18:29:30 +0400 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2014-05-20 02:43:52 +0400 |
commit | c23c96b638cbf6c489fd301e6b3d5555632fba37 (patch) | |
tree | 29f7ad0d28757e30b38ac35b0d8bcf57545965f3 /libavformat/utils.c | |
parent | afe176265480880e1f702c96a8ba434b0d88728b (diff) |
lavf: add av_stream_get_side_data
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index c89d7ad5c4..de66c6b2b9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3474,3 +3474,18 @@ int ff_generate_avci_extradata(AVStream *st) return 0; } + +uint8_t *av_stream_get_side_data(AVStream *st, enum AVPacketSideDataType type, + int *size) +{ + int i; + + for (i = 0; i < st->nb_side_data; i++) { + if (st->side_data[i].type == type) { + if (size) + *size = st->side_data[i].size; + return st->side_data[i].data; + } + } + return NULL; +} |