avformat/utils: set AV_PKT_FLAG_KEY for data packets
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 30 Jul 2018 18:10:38 +0000 (11:10 -0700)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 24 Sep 2018 20:51:13 +0000 (13:51 -0700)
libavformat/utils.c

index a72f0a4..c95aaa2 100644 (file)
@@ -1405,7 +1405,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
             presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts));
 
     /* update flags */
-    if (is_intra_only(st->codecpar->codec_id))
+    if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || is_intra_only(st->codecpar->codec_id))
         pkt->flags |= AV_PKT_FLAG_KEY;
 #if FF_API_CONVERGENCE_DURATION
 FF_DISABLE_DEPRECATION_WARNINGS