Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘AVFilter’ {aka ‘struct AVFilter’} has no member named ‘query_formats’ #75

Open
4n70w4 opened this issue Nov 15, 2022 · 8 comments

Comments

@4n70w4
Copy link
Contributor

4n70w4 commented Nov 15, 2022

libavfilter/vf_gltransition.c: At top level:
libavfilter/vf_gltransition.c:572:4: error: ‘AVFilter’ {aka ‘struct AVFilter’} has no member named ‘query_formats’
  572 |   .query_formats = query_formats,
      |    ^~~~~~~~~~~~~
make
CC      libavfilter/vf_gltransition.o
libavfilter/vf_gltransition.c: In function ‘build_shader’:
libavfilter/vf_gltransition.c:150:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  150 |   GLint status;
      |   ^~~~~
libavfilter/vf_gltransition.c: In function ‘build_program’:
libavfilter/vf_gltransition.c:166:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  166 |   char *source = NULL;
      |   ^~~~
libavfilter/vf_gltransition.c:177:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  177 |     unsigned long fsize = ftell(f);
      |     ^~~~~~~~
libavfilter/vf_gltransition.c:187:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  187 |   const char *transition_source = source ? source : f_default_transition_source;
      |   ^~~~~
libavfilter/vf_gltransition.c:213:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  213 |   GLint status;
      |   ^~~~~
libavfilter/vf_gltransition.c: In function ‘setup_vbo’:
libavfilter/vf_gltransition.c:224:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  224 |   GLint loc = glGetAttribLocation(c->program, "position");
      |   ^~~~~
libavfilter/vf_gltransition.c: In function ‘setup_gl’:
libavfilter/vf_gltransition.c:351:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  351 |   int ret;
      |   ^~~
libavfilter/vf_gltransition.c: In function ‘apply_transition’:
libavfilter/vf_gltransition.c:390:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statemen
]
  390 |   const float ts = ((fs->pts - c->first_pts) / (float)fs->time_base.den) - c->offset;
      |   ^~~~~
libavfilter/vf_gltransition.c: At top level:
libavfilter/vf_gltransition.c:572:4: error: ‘AVFilter’ {aka ‘struct AVFilter’} has no member named ‘query_formats’
  572 |   .query_formats = query_formats,
      |    ^~~~~~~~~~~~~
libavfilter/vf_gltransition.c:565:31: warning: missing braces around initializer [-Wmissing-braces]
  565 | AVFilter ff_vf_gltransition = {
      |                               ^
......
  572 |   .query_formats = query_formats,
      |                    {            }
libavfilter/vf_gltransition.c: In function ‘build_program’:
libavfilter/vf_gltransition.c:181:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  181 |     fread(source, fsize, 1, f);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [ffbuild/common.mak:81: libavfilter/vf_gltransition.o] Error 1
@4n70w4
Copy link
Contributor Author

4n70w4 commented Nov 16, 2022

The same if build via docker:

#15 30.83 libavfilter/vf_gltransition.c: At top level:
#15 30.97 libavfilter/vf_gltransition.c:572:3: error: unknown field 'query_formats' specified in initializer
#15 30.97    .query_formats = query_formats,
#15 30.97    ^
#15 30.99 libavfilter/vf_gltransition.c:565:31: warning: missing braces around initializer [-Wmissing-braces]
#15 30.99  AVFilter ff_vf_gltransition = {
#15 30.99                                ^
#15 30.99 libavfilter/vf_gltransition.c:565:31: note: (near initialization for 'ff_vf_gltransition')
#15 31.62 CC    libavfilter/vf_v360.o
#15 31.62 CC    libavfilter/vf_varblur.o
#15 31.62 CC    libavfilter/vf_vfrdet.o
#15 31.62 CC    libavfilter/vf_vibrance.o
#15 31.64 CC    libavfilter/vf_vaguedenoiser.o
#15 31.66 CC    libavfilter/vf_vectorscope.o
#15 31.68 CC    libavfilter/vf_vflip.o
#15 31.71 CC    libavfilter/vf_vif.o
#15 31.73 CC    libavfilter/vf_vignette.o
#15 31.83 CC    libavfilter/vf_vmafmotion.o
#15 31.85 CC    libavfilter/vf_w3fdif.o
#15 31.85 ffbuild/common.mak:81: recipe for target 'libavfilter/vf_gltransition.o' failed
#15 31.90 make: *** [libavfilter/vf_gltransition.o] Error 1
#15 31.90 make: *** Waiting for unfinished jobs....
------
executor failed running [/bin/sh -c (cd ffmpeg; make -j)]: exit code: 2

@aus70
Copy link

aus70 commented Dec 20, 2022

it has to do with this commit: FFmpeg/FFmpeg@b4f5201

Replacing query_formats with FILTER_QUERY_FUNC(query_formats) in vf_gltransition.c solves the issue.

@aus70
Copy link

aus70 commented Dec 21, 2022

I could compile the binary, but it does not work properly: see issue #72

@aus70
Copy link

aus70 commented Dec 21, 2022

The issue I found (likely - but not for sure - the same as #72) is related to FFmpeg/FFmpeg@8be701d

Solved by removing { NULL } in static const AVFilterPad gltransition_outputs[] and static const AVFilterPad gltransition_inputs[] in vf_gltransition.c

@TTV-DJMoleHill
Copy link

The issue I found (likely - but not for sure - the same as #72) is related to FFmpeg/FFmpeg@8be701d

Solved by removing { NULL } in static const AVFilterPad gltransition_outputs[] and static const AVFilterPad gltransition_inputs[] in vf_gltransition.c

Hi. I am hitting this same issue. I implemented your suggested fix (#75 (comment) and #75 (comment)). Doing so resulted in a successful build, as well as a successful ./ffmpeg -v 0 -filters | grep gltransition, however the resulting video from ./ffmpeg -i media/0.mp4 -i media/1.mp4 -filter_complex gltransition -y out.mp4 contains only the first video with no transition at all.

I was able to work around this issue by checking out commit d53d48c7993fe2e9ffcc4a638ebd2f4c5273c144 in my ffmpeg checkout (1 commit before 8be701d9f7f77ff2282cc7fe6e0791ca5419de70).

@AnJoiner
Copy link

I also modified it as above, but it didn't work. Later, I used ffmpeg 4.4 version successfully without modifying "query formats". You can also try!

@aus70
Copy link

aus70 commented Jan 13, 2023

it's likely the last version that will ever work with ffmpeg-gl-transition if nobody updates the code

I also modified it as above, but it didn't work. Later, I used ffmpeg 4.4 version successfully without modifying "query formats". You can also try!

@sujialin9527
Copy link

The issue I found (likely - but not for sure - the same as #72) is related to FFmpeg/FFmpeg@8be701d
Solved by removing { NULL } in static const AVFilterPad gltransition_outputs[] and static const AVFilterPad gltransition_inputs[] in vf_gltransition.c

Hi. I am hitting this same issue. I implemented your suggested fix (#75 (comment) and #75 (comment)). Doing so resulted in a successful build, as well as a successful ./ffmpeg -v 0 -filters | grep gltransition, however the resulting video from ./ffmpeg -i media/0.mp4 -i media/1.mp4 -filter_complex gltransition -y out.mp4 contains only the first video with no transition at all.

I was able to work around this issue by checking out commit d53d48c7993fe2e9ffcc4a638ebd2f4c5273c144 in my ffmpeg checkout (1 commit before 8be701d9f7f77ff2282cc7fe6e0791ca5419de70).

Can you explain it in detail? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants