mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
avcodec/libx265: export chosen picture types
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
bd737b5178
commit
31048d48b0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user