Compile error FFmpeg.cpp

Hello,

I’m trying to build svn rev. 10465 from today but it fails with following error:

g++ -c -I…/lib-src/portmixer/include -I…/lib-src/portaudio-v19/include -Wall -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I…/lib-src/FileDialog -Wall -I/usr/src/audacity/audacity-1.3.13/lib-src/lib-widget-extra -I…/lib-src/libresample/include -I…/lib-src/sbsms/include -I/usr/include/soundtouch -I…/lib-src/libnyquist -I…/lib-src/libvamp -Wall -I/usr/src/audacity/audacity-1.3.13/lib-src/portsmf -fno-strict-aliasing -I./include -I. -DLIBDIR=“/usr/local//lib” -D__STDC_CONSTANT_MACROS -Wall -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 FFmpeg.cpp -o FFmpeg.o
FFmpeg.cpp:257: error: invalid conversion from ‘int ()(URLContext, unsigned char*, int)’ to ‘int ()(URLContext, const unsigned char*, int)’
make[1]: *** [FFmpeg.o] Error 1
make[1]: Leaving directory `/usr/src/audacity/audacity-1.3.13/src’
make: *** [audacity] Error 2

Someone can help to fix this?

I’m also using latest ffmpeg svn.

When you configured --with-ffmpeg are you linking to the correct library (=system if you installed svn ffmpeg)?

Apart from compilation, Audacity won’t load SVN FFmpeg libraries unless you modify …/src/FFmpeg.h and …/src/FFmpeg.cpp.




Gale

I’ve moved this topic here as it doesn’t really belong in the Audacity 1.2 part of the forum.

I’m about to update my SVN build and I’ll let you know if I have similar problems, but I expect it will be some sort of dependency issue.
Have you successfully built Audacity on that computer before, or is this the first time?

Which one is that? If it’s the nightly Subversion snapshot it may be too recent. I’m using the 52.36.0 version from July 2009. According to this, all versions from the latter half of 2009 should be OK. http://manual.audacityteam.org/index.php?title=FAQ:Installation_and_Plug-Ins#installffmpeg

For later versions of FFMpeg you need to change all instances of “match_ext” in …/src/FFmpeg.h and …/src/FFmpeg.cpp to “av_match_ext”.

Oops, sorry about the repetition - I took so long looking for that link that Gale got to the “post” button ahead of me :smiley:

I’m using svn rev 23536 from today (Jun 08, 2010).
I’ve also changed match_ext to av_match_ext in both FFmpeg.cpp and FFmpeg.h files.

It compiles always fine before Jun 02, 2010. On Jun 02 and after it don’t compile.

I was able to get audacity-minsrc-1.3.12-beta to compile with ffmpeg-export-2010-06-16 by
changing src/FFmpeg.cpp line 207
from:
static int ufile_write(URLContext *h, unsigned char *buf, int size)
to:
static int ufile_write(URLContext *h, const unsigned char *buf, int size)

This was in addition to changing match_ext to av_match_ext as noted above.

Thanks for that. I’ve added the information to http://wiki.audacityteam.org/wiki/Known_Issues#Active_issues.


Gale

Is there any specific reason why these fixes are not currently in the svn repository? FFmpeg import/export hasn’t worked with svn versions for over a year now and does not even work with the current .6 stable release.

Because different fixes are required for different versions of FFmpeg. The current code works for the majority of users, but current fixes for the remaining minority of uses can break support for the majority. The current development of this issue is to fix it for all users, on all platforms, and to do so without breaching licensing terms. This has not yet been achieved, so currently we have the uncomfortable situation of having functioning FFmpeg support for most users, and a variety of patches for other versions of FFmpeg.

Audacity 1.2.6 has never had FFmpeg support. This issue is entirely concerned with the 1.3.x beta version.

I’m sorry, I was referring to the current FFmpeg 0.6.1 stable, not audacity 1.2.6, which is what I would assume most people use.

Thank you very much for fixing this bug!!!