]> git.sesse.net Git - ffmpeg/commitdiff
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 d45a6b55a7e11ff42cc8156f6f6b8f4913a3a04a..3fd17dd771c02d6b8427b0f1af9041e5f57b094e 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;