[FFmpeg-devel] [PATCH] silence warning about deprecated option syntax for scale filter
Paul B Mahol
onemda at gmail.com
Fri Apr 12 11:56:19 CEST 2013
On 4/12/13, Clement Boesch <ubitux at gmail.com> wrote:
> 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="
Proof?
>
> --
> Clement B.
>
More information about the ffmpeg-devel
mailing list