[FFmpeg-devel] [PATCH] avformat/utils: preserve AV_PKT_FLAG_DISCARD in parse_packet

John Stebbins jstebbins at jetheaddev.com
Sat Nov 11 02:07:28 EET 2017


---
 libavformat/utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2b2411ffe7..93a5a00105 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1457,6 +1457,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;
-- 
2.13.6



More information about the ffmpeg-devel mailing list