ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Fri May 16 16:16:49 2025 +0200| [b5f26c4dd8198424b59889832618696b270b1a6b] | committer: Andreas Rheinhardt
avcodec/utvideoenc: Don't advertise unsupported option Also return an better error code if it is set numerically. (This option was added in 2862b63783b5556f7f3fb2d097629bc6879f833a when an AVCodecContext generic option was moved to a codec private one without realizing that not every generic one is valid for every encoder.) Reviewed-by: Jan Ekström <jee...@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5f26c4dd8198424b59889832618696b270b1a6b --- libavcodec/utvideoenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index be503d78c6..c2b5a8abb7 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -153,7 +153,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) if (c->frame_pred == PRED_GRADIENT) { av_log(avctx, AV_LOG_ERROR, "Gradient prediction is not supported.\n"); - return AVERROR_OPTION_NOT_FOUND; + return AVERROR_PATCHWELCOME; } /* @@ -646,7 +646,6 @@ static const AVOption options[] = { { "pred", "Prediction method", OFFSET(frame_pred), AV_OPT_TYPE_INT, { .i64 = PRED_LEFT }, PRED_NONE, PRED_MEDIAN, VE, .unit = "pred" }, { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRED_NONE }, INT_MIN, INT_MAX, VE, .unit = "pred" }, { "left", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRED_LEFT }, INT_MIN, INT_MAX, VE, .unit = "pred" }, - { "gradient", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRED_GRADIENT }, INT_MIN, INT_MAX, VE, .unit = "pred" }, { "median", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRED_MEDIAN }, INT_MIN, INT_MAX, VE, .unit = "pred" }, { NULL}, _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".