diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-20 03:39:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-20 03:39:04 +0200 |
commit | 7d25af1547f8d97231f1c6e4cab7ad2bbf1dd071 (patch) | |
tree | 4e3c6acef8b008570ae2db92455799014fc5eeca /libavformat/utils.c | |
parent | 9e6769d2dc7bb33a2317b85fb55239958119e78c (diff) | |
parent | c23c96b638cbf6c489fd301e6b3d5555632fba37 (diff) | |
download | ffmpeg-7d25af1547f8d97231f1c6e4cab7ad2bbf1dd071.tar.gz |
Merge commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37'
* commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37':
lavf: add av_stream_get_side_data
Conflicts:
doc/APIchanges
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 6454421d7d..f840bc045e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4665,3 +4665,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; +} |