[FFmpeg-devel] [PATCH 2/2] avfilter/buffersrc: deprecate sws_param option
quinkblack at foxmail.com
quinkblack at foxmail.com
Mon Dec 2 15:18:51 EET 2019
From: Zhao Zhili <zhilizhao at tencent.com>
---
doc/filters.texi | 4 +---
libavfilter/buffersrc.c | 8 ++++++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 5fdec6f015..9b3c2d7c2d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -21014,9 +21014,7 @@ Specify the frame rate expected for the video stream.
The sample (pixel) aspect ratio of the input video.
@item sws_param
-Specify the optional parameters to be used for the scale filter which
-is automatically inserted when an input change is detected in the
-input size or format.
+This option is deprecated and ignored.
@item hw_frames_ctx
When using a hardware pixel format, this should be a reference to an
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index bae7d86695..af6039f9b3 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -287,10 +287,14 @@ static av_cold int init_video(AVFilterContext *ctx)
if (!(c->fifo = av_fifo_alloc(sizeof(AVFrame*))))
return AVERROR(ENOMEM);
- av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s tb:%d/%d fr:%d/%d sar:%d/%d sws_param:%s\n",
+ av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d pixfmt:%s tb:%d/%d fr:%d/%d sar:%d/%d\n",
c->w, c->h, av_get_pix_fmt_name(c->pix_fmt),
c->time_base.num, c->time_base.den, c->frame_rate.num, c->frame_rate.den,
- c->pixel_aspect.num, c->pixel_aspect.den, (char *)av_x_if_null(c->sws_param, ""));
+ c->pixel_aspect.num, c->pixel_aspect.den);
+
+ if (c->sws_param)
+ av_log(ctx, AV_LOG_WARNING, "sws_param option is deprecated and ignored\n");
+
return 0;
}
--
2.22.0
More information about the ffmpeg-devel
mailing list