Message ID | 20191202131851.3563-2-quinkblack@foxmail.com |
---|---|
State | New |
Headers | show |
quinkblack@foxmail.com (12019-12-02): > From: Zhao Zhili <zhilizhao@tencent.com> > > --- > doc/filters.texi | 4 +--- > libavfilter/buffersrc.c | 8 ++++++-- > 2 files changed, 7 insertions(+), 5 deletions(-) Ok. But ideally you would include deprecation guards so that it is automatically removed in two versions. Regards,
> On Dec 2, 2019, at 9:49 PM, Nicolas George <george@nsup.org> wrote: > > quinkblack@foxmail.com (12019-12-02): >> From: Zhao Zhili <zhilizhao@tencent.com> >> >> --- >> doc/filters.texi | 4 +--- >> libavfilter/buffersrc.c | 8 ++++++-- >> 2 files changed, 7 insertions(+), 5 deletions(-) > > Ok. But ideally you would include deprecation guards so that it is > automatically removed in two versions. You mean add attribute_deprecated? I will update the patch. > > Regards, > > -- > Nicolas George > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
zhilizhao (12019-12-02):
> You mean add attribute_deprecated? I will update the patch.
Possibly that, but most of all an FF_API_ constant like in this commit.
That way, the option will disappear automatically in a few months and
the cleanup is made easier.
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/3aa6208db9666c0f1351855262d8c839002d9de1
Regards,
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; }
From: Zhao Zhili <zhilizhao@tencent.com> --- doc/filters.texi | 4 +--- libavfilter/buffersrc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-)