diff options
author | Araz Iusubov <primeadvice@gmail.com> | 2024-10-28 18:21:05 +0100 |
---|---|---|
committer | Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com> | 2024-11-07 15:11:10 +0100 |
commit | f63f1641255a8fb25bf40c775905fbf29e15eebb (patch) | |
tree | 7bff679920c49a96791dd308e7399138af0cb6da /libavcodec/amfenc_hevc.c | |
parent | 4047b887fc44b110bccb1da09bcb79d6e454b88b (diff) | |
download | ffmpeg-f63f1641255a8fb25bf40c775905fbf29e15eebb.tar.gz |
avcodec/amfenc: GOP size check
Fix for the error with an invalid GOP size parameter.
Diffstat (limited to 'libavcodec/amfenc_hevc.c')
-rw-r--r-- | libavcodec/amfenc_hevc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c index f633677574..248581bd33 100644 --- a/libavcodec/amfenc_hevc.c +++ b/libavcodec/amfenc_hevc.c @@ -261,7 +261,9 @@ FF_ENABLE_DEPRECATION_WARNINGS // Picture control properties AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR, ctx->gops_per_idr); - AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_GOP_SIZE, avctx->gop_size); + if (avctx->gop_size != -1) { + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_GOP_SIZE, avctx->gop_size); + } if (avctx->slices > 1) { AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_SLICES_PER_FRAME, avctx->slices); } |