[FFmpeg-devel] [PATCH] silence warning about deprecated option syntax for scale filter
Clément Bœsch
ubitux at gmail.com
Fri Apr 12 11:47:37 CEST 2013
On Fri, Apr 12, 2013 at 09:42:00AM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> ffmpeg_filter.c | 2 +-
> libavfilter/avfiltergraph.c | 2 +-
> libavfilter/graphparser.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
> index 4d9e97d..54ab823 100644
> --- a/ffmpeg_filter.c
> +++ b/ffmpeg_filter.c
> @@ -300,7 +300,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
> char args[255];
> AVFilterContext *filter;
>
> - snprintf(args, sizeof(args), "%d:%d:flags=0x%X",
> + snprintf(args, sizeof(args), "w=%d:h=%d:flags=0x%X",
I hope "s=%dx%d" still works...
> codec->width,
> codec->height,
> (unsigned)ost->sws_flags);
> diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
> index 3e1d5ef..88508a1 100644
> --- a/libavfilter/avfiltergraph.c
> +++ b/libavfilter/avfiltergraph.c
> @@ -393,7 +393,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
>
> snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
> scaler_count++);
> - av_strlcpy(scale_args, "0:0", sizeof(scale_args));
> + av_strlcpy(scale_args, "w=0:h=0", sizeof(scale_args));
> if (graph->scale_sws_opts) {
> av_strlcat(scale_args, ":", sizeof(scale_args));
> av_strlcat(scale_args, graph->scale_sws_opts, sizeof(scale_args));
> diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
> index bd6863e..f50c3a1 100644
> --- a/libavfilter/graphparser.c
> +++ b/libavfilter/graphparser.c
> @@ -118,7 +118,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
>
> if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
> ctx->scale_sws_opts) {
> - snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
> + snprintf(tmp_args, sizeof(tmp_args), "%s:flags=%s",
> args, ctx->scale_sws_opts);
I think ctx->scale_sws_opts can contain "flags="
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130412/4fc4c234/attachment.asc>
More information about the ffmpeg-devel
mailing list