[FFmpeg-devel] [PATCH] Mark AVFilterPad[] compound literals as const.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Nov 6 00:07:16 CET 2011
On Sat, Nov 05, 2011 at 11:52:13PM +0100, Stefano Sabatini wrote:
> On date Saturday 2011-11-05 14:59:24 +0100, Reimar Döffinger encoded:
> > GCC 4.6.2 at least still seems to fail to put them in .rodata though.
> >
> > Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> > ---
> > libavfilter/af_aconvert.c | 4 ++--
> > libavfilter/af_aformat.c | 4 ++--
> > libavfilter/af_anull.c | 4 ++--
> > libavfilter/af_aresample.c | 4 ++--
> > libavfilter/af_ashowinfo.c | 4 ++--
> > libavfilter/af_earwax.c | 4 ++--
> > libavfilter/af_volume.c | 4 ++--
> > libavfilter/asink_anullsink.c | 4 ++--
> > libavfilter/asrc_abuffer.c | 4 ++--
> > libavfilter/asrc_aevalsrc.c | 4 ++--
> > libavfilter/asrc_anullsrc.c | 4 ++--
> > libavfilter/sink_buffer.c | 8 ++++----
> > libavfilter/src_movie.c | 8 ++++----
> > libavfilter/vf_aspect.c | 8 ++++----
> > libavfilter/vf_blackframe.c | 4 ++--
> > libavfilter/vf_boxblur.c | 4 ++--
> > libavfilter/vf_copy.c | 4 ++--
> > libavfilter/vf_crop.c | 4 ++--
> > libavfilter/vf_cropdetect.c | 4 ++--
> > libavfilter/vf_delogo.c | 6 +++---
> > libavfilter/vf_deshake.c | 4 ++--
> > libavfilter/vf_drawbox.c | 4 ++--
> > libavfilter/vf_drawtext.c | 4 ++--
> > libavfilter/vf_fade.c | 4 ++--
> > libavfilter/vf_fieldorder.c | 4 ++--
> > libavfilter/vf_fifo.c | 4 ++--
> > libavfilter/vf_format.c | 8 ++++----
> > libavfilter/vf_frei0r.c | 8 ++++----
> > libavfilter/vf_gradfun.c | 4 ++--
> > libavfilter/vf_hflip.c | 4 ++--
> > libavfilter/vf_hqdn3d.c | 4 ++--
> > libavfilter/vf_libopencv.c | 4 ++--
> > libavfilter/vf_lut.c | 6 +++---
> > libavfilter/vf_mp.c | 4 ++--
> > libavfilter/vf_null.c | 4 ++--
> > libavfilter/vf_overlay.c | 4 ++--
> > libavfilter/vf_pad.c | 4 ++--
> > libavfilter/vf_pixdesctest.c | 4 ++--
> > libavfilter/vf_scale.c | 4 ++--
> > libavfilter/vf_select.c | 4 ++--
> > libavfilter/vf_setpts.c | 4 ++--
> > libavfilter/vf_settb.c | 4 ++--
> > libavfilter/vf_showinfo.c | 4 ++--
> > libavfilter/vf_slicify.c | 4 ++--
> > libavfilter/vf_split.c | 4 ++--
> > libavfilter/vf_transpose.c | 4 ++--
> > libavfilter/vf_unsharp.c | 4 ++--
> > libavfilter/vf_vflip.c | 4 ++--
> > libavfilter/vf_yadif.c | 4 ++--
> > libavfilter/vsink_nullsink.c | 4 ++--
> > libavfilter/vsrc_buffer.c | 4 ++--
> > libavfilter/vsrc_color.c | 4 ++--
> > libavfilter/vsrc_mptestsrc.c | 4 ++--
> > libavfilter/vsrc_testsrc.c | 12 ++++++------
> > 54 files changed, 124 insertions(+), 124 deletions(-)
> >
> > diff --git a/libavfilter/af_aconvert.c b/libavfilter/af_aconvert.c
> > index fef096c..fc3dc8d 100644
> > --- a/libavfilter/af_aconvert.c
> > +++ b/libavfilter/af_aconvert.c
> > @@ -406,12 +406,12 @@ AVFilter avfilter_af_aconvert = {
> > .uninit = uninit,
> > .query_formats = query_formats,
> >
> > - .inputs = (AVFilterPad[]) {{ .name = "default",
> > + .inputs = (const AVFilterPad[]) {{ .name = "default",
>
> maybe align the "=" like this:
>
> > - .inputs = (AVFilterPad[]) {{ .name = "default",
> > + .inputs = (const AVFilterPad[]) {{ .name = "default",
>
> if you mind, push that otherwise if you verified that it works and
> doesn't cause regressions.
I tried, however things weren't completely consistent before either.
Anyway, pushed a variant.
> And yes I agree putting .name on a dedicated line and reducing indent
> may be better, but that's bikeshed so it shouldn't block this patch.
If someone feels motivated (it's a lot of filters and rather tedious),
there's quite a few filters that use inconsistent formatting compared
to the majority...
More information about the ffmpeg-devel
mailing list