Opened 6 weeks ago

Last modified 5 weeks ago

#2419 open defect

Fail to build with ffmpeg 7

Reported by: marillat@… Owned by: beastd
Priority: normal Component: undetermined
Version: HEAD Severity: blocker
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

mplayer svn r38458
ffmpeg 7.0 and ffmpeg master
Debian unstable amd64 GCC 13.2.0

cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=x86-64 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wdate-time -D_FORTIFY_SOURCE=2 -fpie -DPIC -D_REENTRANT -I/usr/include/p11-kit-1 -I/usr/include/samba-4.0 -I/usr/include/ -I/usr/include/openjpeg-2.5 -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/libpng16 -DZLIB_CONST -I/usr/include/opus -I/usr/include/bs2b -I/usr/include/libxml2 -c -o libao2/ao_jack.o libao2/ao_jack.c
libao2/ao_jack.c:74:8: error: unknown type name 'AVFifoBuffer'
   74 | static AVFifoBuffer *buffer;
      |        ^~~~~~~~~~~~
libao2/ao_jack.c: In function 'write_buffer':
libao2/ao_jack.c:85:14: error: implicit declaration of function 'av_fifo_space'; did you mean 'av_fifo_peek'? [-Werror=implicit-function-declaration]
   85 |   int free = av_fifo_space(buffer);
      |              ^~~~~~~~~~~~~
      |              av_fifo_peek
libao2/ao_jack.c:87:10: error: implicit declaration of function 'av_fifo_generic_write'; did you mean 'av_fifo_can_write'? [-Werror=implicit-function-declaration]
   87 |   return av_fifo_generic_write(buffer, data, len, NULL);
      |          ^~~~~~~~~~~~~~~~~~~~~
      |          av_fifo_can_write
libao2/ao_jack.c: In function 'read_buffer':
libao2/ao_jack.c:128:18: error: implicit declaration of function 'av_fifo_size'; did you mean 'av_fifo_write'? [-Werror=implicit-function-declaration]
  128 |   int buffered = av_fifo_size(buffer);
      |                  ^~~~~~~~~~~~
      |                  av_fifo_write
libao2/ao_jack.c:133:3: error: implicit declaration of function 'av_fifo_generic_read'; did you mean 'av_fifo_can_read'? [-Werror=implicit-function-declaration]
  133 |   av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave);
      |   ^~~~~~~~~~~~~~~~~~~~
      |   av_fifo_can_read
libao2/ao_jack.c: In function 'init':
libao2/ao_jack.c:245:12: error: implicit declaration of function 'av_fifo_alloc'; did you mean 'av_fifo_alloc2'? [-Werror=implicit-function-declaration]
  245 |   buffer = av_fifo_alloc(BUFFSIZE);
      |            ^~~~~~~~~~~~~
      |            av_fifo_alloc2
libao2/ao_jack.c:245:10: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  245 |   buffer = av_fifo_alloc(BUFFSIZE);
      |          ^
libao2/ao_jack.c:284:3: warning: 'jack_port_get_total_latency' is deprecated [-Wdeprecated-declarations]
  284 |   jack_latency = (float)(jack_port_get_total_latency(client, ports[0]) +
      |   ^~~~~~~~~~~~
In file included from libao2/ao_jack.c:41:
/usr/include/jack/jack.h:1243:16: note: declared here
 1243 | jack_nframes_t jack_port_get_total_latency (jack_client_t *client,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
libao2/ao_jack.c:305:3: error: implicit declaration of function 'av_fifo_free'; did you mean 'av_fifo_freep2'? [-Werror=implicit-function-declaration]
  305 |   av_fifo_free(buffer);
      |   ^~~~~~~~~~~~
      |   av_fifo_freep2
libao2/ao_jack.c: In function 'reset':
libao2/ao_jack.c:327:3: error: implicit declaration of function 'av_fifo_reset'; did you mean 'av_fifo_reset2'? [-Werror=implicit-function-declaration]
  327 |   av_fifo_reset(buffer);
      |   ^~~~~~~~~~~~~
      |   av_fifo_reset2
cc1: some warnings being treated as errors

Change History (5)

comment:1 by beastd, 5 weeks ago

Status: newopen

There is a patch[1] from me on the development mailing list. Beware the quoted one is from a different person, mine is the one in the attachment.

From what I could hear on my machine, it worked fine. Wanted to check if it's technically correct before committing.

1: https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-April/074171.html

comment:2 by marillat@…, 5 weeks ago

For me the build fail because libavcodec/xvmc.h has been removed in ffmpeg 7.0

cc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=c11 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=x86-64 -mtune=generic -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wdate-time -D_FORTIFY_SOURCE=2 -fpie -DPIC -D_REENTRANT -I/usr/include/p11-kit-1 -I/usr/include/samba-4.0 -I/usr/include/ -I/usr/include/openjpeg-2.5 -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/libpng16 -DZLIB_CONST -I/usr/include/opus -I/usr/include/bs2b -I/usr/include/libxml2 -c -o libvo/vo_xvmc.o libvo/vo_xvmc.c
libvo/vo_xvmc.c:48:10: fatal error: libavcodec/xvmc.h: No such file or directory
   48 | #include "libavcodec/xvmc.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

comment:3 by marillat@…, 5 weeks ago

OK, I see that XvMC has been relmoved in ffmpeg 7.0

I'll do a new build with --disable-xvmc

Changelog:- dropped obsolete XvMC hwaccel

in reply to:  1 ; comment:4 by marillat@…, 5 weeks ago

Replying to beastd:

There is a patch[1] from me on the development mailing list. Beware the quoted one is from a different person, mine is the one in the attachment.

Work fine for me. I did a simple test

mencoder foo.avi -oac copy -ovc copy -o foo.mkv

in reply to:  4 comment:5 by beastd, 5 weeks ago

Replying to marillat@…:

Replying to beastd:

There is a patch[1] from me on the development mailing list. Beware the quoted one is from a different person, mine is the one in the attachment.

Work fine for me. I did a simple test

mencoder foo.avi -oac copy -ovc copy -o foo.mkv

This doesn't involve ao jack though. Build works for me as well.

I actually tested with playback via ao jack and that sounded fine too.

I need to check if it is technically correct and doesn't introduce concurrency problems. That's why I added locking back into ao sdl.

Note: See TracTickets for help on using tickets.