[FFmpeg-devel] [PATCH] ffmpeg: add av_unused to sws_flags variable
Måns Rullgård
mans
Sat Mar 12 13:07:17 CET 2011
Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> On date Saturday 2011-03-12 11:43:03 +0000, M?ns Rullg?rd encoded:
>> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
>>
>> > The variable is not used when libavfilter is enabled.
>> > Fix the warning:
>> > ffmpeg.c: At top level:
>> > ffmpeg.c:248: warning: ?sws_flags? defined but not used
>> > ---
>> > ffmpeg.c | 2 +-
>> > 1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/ffmpeg.c b/ffmpeg.c
>> > index 7f90956..875d594 100644
>> > --- a/ffmpeg.c
>> > +++ b/ffmpeg.c
>> > @@ -245,7 +245,7 @@ static char *forced_key_frames = NULL;
>> >
>> > static float dts_delta_threshold = 10;
>> >
>> > -static unsigned int sws_flags = SWS_BICUBIC;
>> > +static av_unused unsigned int sws_flags = SWS_BICUBIC;
>> >
>> > static int64_t timer_start;
>>
>> Shouldn't it be moved under some appropriate ifdef then?
>
> That's another option, updated.
> --
> FFmpeg = Fundamentalist & Faithless Mystic Peaceless Evangelical Guide
>
> From 03ebba4cc7f99ce55684b20ea698b3e6aad23d0e Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Sat, 12 Mar 2011 12:12:38 +0100
> Subject: [PATCH] ffmpeg: include conditionally the sws_flags variable
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The variable is not used when libavfilter is enabled.
> Fix the warning:
> ffmpeg.c: At top level:
> ffmpeg.c:248: warning: ?sws_flags? defined but not used
> ---
> ffmpeg.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 7f90956..60a65a4 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -245,7 +245,9 @@ static char *forced_key_frames = NULL;
>
> static float dts_delta_threshold = 10;
>
> +#if !CONFIG_AVFILTER
> static unsigned int sws_flags = SWS_BICUBIC;
> +#endif
>
> static int64_t timer_start;
>
I'd rather use the existing ifdef a page up from there.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list