diff --git a/libavformat/utils.c b/libavformat/utils.c index 2c62d304c2..baa717701a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1342,6 +1342,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) {