avformat/utils: preserve AV_PKT_FLAG_DISCARD in parse_packet
authorJohn Stebbins <jstebbins@jetheaddev.com>
Sat, 11 Nov 2017 00:07:28 +0000 (16:07 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 11 Nov 2017 13:15:15 +0000 (14:15 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/utils.c

index d45a6b5..3fd17dd 100644 (file)
@@ -1458,6 +1458,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
         out_pkt.pts          = st->parser->pts;
         out_pkt.dts          = st->parser->dts;
         out_pkt.pos          = st->parser->pos;
+        out_pkt.flags       |= pkt->flags & AV_PKT_FLAG_DISCARD;
 
         if (st->need_parsing == AVSTREAM_PARSE_FULL_RAW)
             out_pkt.pos = st->parser->frame_offset;