Commit 2ddedfd3 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libx265: export choosen picture types

Fixes part of ticket 4285

Reviewed-by Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 749fbfd0
...@@ -272,6 +272,19 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -272,6 +272,19 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pkt->pts = x265pic_out.pts; pkt->pts = x265pic_out.pts;
pkt->dts = x265pic_out.dts; 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; *got_packet = 1;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment