Opened 3 months ago

Closed 3 months ago

#11144 closed defect (fixed)

Quirc filter does not compile

Reported by: Squaduck Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: build compilation
Cc: Squaduck Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Quirc filter does not compile.

How to reproduce:

% ./configure --enable-libquirc ; make
libavfilter/vf_quirc.c: In function ‘filter_frame’:
libavfilter/vf_quirc.c:92:5: error: unknown type name ‘FilterLink’; did you mean ‘AVFilterLink’?
   92 |     FilterLink *inl = ff_filter_link(inlink);
      |     ^~~~~~~~~~
      |     AVFilterLink
libavfilter/vf_quirc.c:92:23: error: implicit declaration of function ‘ff_filter_link’; did you mean ‘avfilter_link’? [-Werror=implicit-function-declaration]
   92 |     FilterLink *inl = ff_filter_link(inlink);
      |                       ^~~~~~~~~~~~~~
      |                       avfilter_link
libavfilter/vf_quirc.c:92:23: warning: initialization of ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
libavfilter/vf_quirc.c:108:68: error: request for member ‘frame_count_out’ in something not a structure or union
  108 |            "Found count %d codes in image #%ld\n", codes_count, inl->frame_count_out);
      |                                                                    ^~
cc1: some warnings being treated as errors

(actual command, irrelevant lines were omitted in the example above):
./configure --disable-everything --disable-avdevice --disable-avcodec --disable-avformat --disable-swresample --disable-swscale --disable-postproc --disable-autodetect --enable-filter=quirc --enable-libquirc ; make -j ${nproc}

Building on
Linux 6.10.4-1-default # 1 SMP PREEMPT_DYNAMIC Mon Aug 12 05:49:20 UTC 2024 (0363a35) x86_64
with
gcc (SUSE Linux) 13.3.1 20240807 [revision 9d368828bd4d04ce5 07e02a581be850fca849fae]
on ffmpeg commit 5c1c0325cd1bd3f826bbd73dffd0b07974a586bd
and quirc commit fd13bfbf4f58b0a966 b2fdfd634b96faaf3f34d2

Adding the line #include "filters.h" seems to fix it. Looking at git log, it seems like quirc never included "filters.h", so I have no clue why it was fine before. I don't know what the procedure to contribute code is, so I'm just going to let someone who knows what they're doing do what needs to be done. (I know that it'd be really simple, and perhaps even a good first commit, but I don't want to go down that rabbit hole right now.)

Change History (2)

comment:1 by Gyan, 3 months ago

I came across this issue today. Already sent a patch.

comment:2 by Squaduck, 3 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.