aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-29 01:20:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-29 01:45:32 +0200
commit9789595189e7f192aa269a830211763fb73e4f0d (patch)
tree0fb4caa8b037ca845e4bb7a47b046b55001accd2 /libavcodec
parent15eda746e738d009dd4faee66888dc27c51d3cbd (diff)
downloadffmpeg-9789595189e7f192aa269a830211763fb73e4f0d.tar.gz
avcodec/utils: Set coded_frame.pict_type in generic code
This makes it possible to remove more coded_frame usage without breaking the publically visible coded_frame Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0b2e5f1da8..5dbd0cf205 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2133,6 +2133,8 @@ FF_DISABLE_DEPRECATION_WARNINGS
if (!ret && got_packet && avctx->coded_frame) {
avctx->coded_frame->pts = pkt.pts;
avctx->coded_frame->key_frame = !!(pkt.flags & AV_PKT_FLAG_KEY);
+ if (avctx->codec->capabilities & AV_CODEC_CAP_INTRA_ONLY)
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
}
FF_ENABLE_DEPRECATION_WARNINGS
#endif