From c330eba84cf2370ad72423aa9e410e20afdc52e2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 17 May 2013 07:39:34 +0200 Subject: [PATCH] lavf: preserve side data when parsing packets. --- libavformat/utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index eb0188655a..f415eae45c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1062,6 +1062,13 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index) if (!out_pkt.size) continue; + if (pkt->side_data) { + out_pkt.side_data = pkt->side_data; + out_pkt.side_data_elems = pkt->side_data_elems; + pkt->side_data = NULL; + pkt->side_data_elems = 0; + } + /* set the duration */ out_pkt.duration = 0; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {