From c23c96b638cbf6c489fd301e6b3d5555632fba37 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 19 May 2014 16:29:30 +0200 Subject: lavf: add av_stream_get_side_data --- libavformat/utils.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libavformat/utils.c') 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; +} -- cgit v1.2.3