From: Zhao Zhili <zhiliz...@tencent.com> x265_sei is available since X265_BUILD 88. This fixes a regression from commit 1f585030137.
Signed-off-by: Zhao Zhili <zhiliz...@tencent.com> --- libavcodec/libx265.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 4aa96e1f2d..e36f20a812 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -516,8 +516,10 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ctx->api->picture_init(ctx->params, &x265pic); if (pic) { +#if X265_BUILD >= 88 x265_sei *sei = &x265pic.userSEI; sei->numPayloads = 0; +#endif for (i = 0; i < 3; i++) { x265pic.planes[i] = pic->data[i]; x265pic.stride[i] = pic->linesize[i]; @@ -546,6 +548,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, memcpy(x265pic.userData, &pic->reordered_opaque, sizeof(pic->reordered_opaque)); } +#if X265_BUILD >= 88 if (ctx->udu_sei) { for (i = 0; i < pic->nb_side_data; i++) { AVFrameSideData *side_data = pic->side_data[i]; @@ -573,6 +576,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, sei->numPayloads++; } } +#endif } ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal, @@ -713,7 +717,9 @@ static const AVOption options[] = { { "preset", "set the x265 preset", OFFSET(preset), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, { "tune", "set the x265 tune parameter", OFFSET(tune), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, { "profile", "set the x265 profile", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE }, +#if X265_BUILD >= 88 { "udu_sei", "Use user data unregistered SEI if available", OFFSET(udu_sei), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, +#endif { "x265-params", "set the x265 configuration using a :-separated list of key=value parameters", OFFSET(x265_opts), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE }, { NULL } }; -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".