[FFmpeg-devel] [PATCH] lavc/tiff: Fix build failure due to always_inline

Pavel Koshevoy pkoshevoy at gmail.com
Tue Mar 30 18:07:51 EEST 2021


On Tue, Mar 30, 2021 at 2:26 AM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:

> Pavel Koshevoy:
> > Fixes:
> > src/libavcodec/tiff.c: In function ‘tiff_unpack_strip’:
> > src/libavcodec/tiff.c:280: error: ‘always_inline’ function could not be
> inlined in call to ‘dng_blit’: the function body must appear before caller
> > src/libavcodec/tiff.c:720: error: called from here
> > ---
> >  libavcodec/tiff.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
> > index 0878098b90..4ef685b929 100644
> > --- a/libavcodec/tiff.c
> > +++ b/libavcodec/tiff.c
> > @@ -275,9 +275,9 @@ static int add_metadata(int count, int type,
> >      };
> >  }
> >
> > -static void av_always_inline dng_blit(TiffContext *s, uint8_t *dst, int
> dst_stride,
> > -                                      const uint8_t *src, int
> src_stride, int width, int height,
> > -                                      int is_single_comp, int is_u16);
> > +static void dng_blit(TiffContext *s, uint8_t *dst, int dst_stride,
> > +                     const uint8_t *src, int src_stride, int width, int
> height,
> > +                     int is_single_comp, int is_u16);
> >
> >  static void av_always_inline horizontal_fill(TiffContext *s,
> >                                               unsigned int bpp, uint8_t*
> dst,
> >
> There are no cyclic calls here, so one can just remove the forward
> declaration. I did this here:
> https://ffmpeg.org/pipermail/ffmpeg-devel/2021-March/278386.html Do you
> like it? And what compiler exhibits the problems you mention in the
> commit message?
>
>
I wasn't sure about declaring a function more than a couple lines long as
inline.

The compiler that issued the error was apples gcc 4.2.1 on OS X 10.6

Thank you,
    Pavel.


More information about the ffmpeg-devel mailing list