Skip to content

Commit 76ec892

Browse files
committed
Replace deprecated option "pix_fmts".
pix_fmts -> pixel_formats, av_opt_set_bin -> av_opt_set_array
1 parent a379950 commit 76ec892

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/encode_video.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,14 @@ void init_scaler(
234234
goto end;
235235
}
236236

237-
ret = av_opt_set_bin(
237+
ret = av_opt_set_array(
238238
ctx->buffersink_scale_ctx,
239-
"pix_fmts",
240-
(uint8_t*)&pix_fmt_out,
241-
sizeof(pix_fmt_out),
242-
AV_OPT_SEARCH_CHILDREN);
239+
"pixel_formats",
240+
AV_OPT_SEARCH_CHILDREN,
241+
0,
242+
1,
243+
AV_OPT_TYPE_PIXEL_FMT,
244+
&pix_fmt_out);
243245
if (ret < 0)
244246
{
245247
log_warn("Cannot set output pixel format: %s", av_err2str(ret));

0 commit comments

Comments
 (0)