X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibx265.c;h=aee7ae2274475d7cacd3bff76411d952cdf60c4e;hb=8f79cd4764f7cdf3c5b5252e39ee0a6725f2eb94;hp=923c7506793dd96b328bdaa2644b8e8b4c668e88;hpb=1cf0f27985965c28049b7a8481c859867dad3948;p=ffmpeg diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 923c7506793..aee7ae22744 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -224,6 +224,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, x265pic.pts = pic->pts; x265pic.bitDepth = av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth_minus1 + 1; + + x265pic.sliceType = pic->pict_type == AV_PICTURE_TYPE_I ? X265_TYPE_I : + pic->pict_type == AV_PICTURE_TYPE_P ? X265_TYPE_P : + pic->pict_type == AV_PICTURE_TYPE_B ? X265_TYPE_B : + X265_TYPE_AUTO; } ret = x265_encoder_encode(ctx->encoder, &nal, &nnal,