diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 00:37:46 +0200 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-04-05 12:32:07 -0400 |
commit | 31048d48b0410b9cfb6023054d81e627d01be342 (patch) | |
tree | f7846b719ce5043adc14551d767d0c8fbe0c599b /libavcodec | |
parent | bd737b5178f361a9b592691848f29a7a79603a7e (diff) | |
download | ffmpeg-31048d48b0410b9cfb6023054d81e627d01be342.tar.gz |
avcodec/libx265: export chosen picture types
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libx265.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index d822467a53..a7089b1bb6 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -272,6 +272,19 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, pkt->pts = x265pic_out.pts; pkt->dts = x265pic_out.dts; + switch (x265pic_out.sliceType) { + case X265_TYPE_IDR: + case X265_TYPE_I: + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; + break; + case X265_TYPE_P: + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P; + break; + case X265_TYPE_B: + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B; + break; + } + *got_packet = 1; return 0; } |