[FFmpeg-cvslog] doc/examples/decode_filter_video: switch to new buffersink options

Anton Khirnov git at videolan.org
Mon Sep 30 10:16:00 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Sep 25 17:59:03 2024 +0200| [b150fdd500649a19b37f70da8e05db65bf45a8ac] | committer: Anton Khirnov

doc/examples/decode_filter_video: switch to new buffersink options

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b150fdd500649a19b37f70da8e05db65bf45a8ac
---

 doc/examples/decode_filter_video.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/examples/decode_filter_video.c b/doc/examples/decode_filter_video.c
index 4a5247dbf2..aacc91c2f7 100644
--- a/doc/examples/decode_filter_video.c
+++ b/doc/examples/decode_filter_video.c
@@ -99,7 +99,6 @@ static int init_filters(const char *filters_descr)
     AVFilterInOut *outputs = avfilter_inout_alloc();
     AVFilterInOut *inputs  = avfilter_inout_alloc();
     AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base;
-    enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
 
     filter_graph = avfilter_graph_alloc();
     if (!outputs || !inputs || !filter_graph) {
@@ -129,8 +128,8 @@ static int init_filters(const char *filters_descr)
         goto end;
     }
 
-    ret = av_opt_set_int_list(buffersink_ctx, "pix_fmts", pix_fmts,
-                              AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);
+    ret = av_opt_set(buffersink_ctx, "pixel_formats", "gray8",
+                     AV_OPT_SEARCH_CHILDREN);
     if (ret < 0) {
         av_log(NULL, AV_LOG_ERROR, "Cannot set output pixel format\n");
         goto end;



More information about the ffmpeg-cvslog mailing list