owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.05k stars 235 forks source link

make fails with libav 11.3 #128

Closed freultwah closed 9 years ago

freultwah commented 9 years ago

Trying to build forked-daapd against libav 11.3 results in the following:

uffer.o test -f 'ffmpeg_url_evbuffer.c' || echo './'ffmpeg_url_evbuffer.c ffmpeg_url_evbuffer.c:40:19: error: unknown type name 'URLContext' url_evbuffer_open(URLContext h, const char filename, int flags) ^ ffmpeg_url_evbuffer.c:46:16: error: use of undeclared identifier 'URL_WRONLY' if (flags != URL_WRONLY) ^ ffmpeg_url_evbuffer.c:95:20: error: unknown type name 'URLContext' url_evbuffer_close(URLContext h) ^ ffmpeg_url_evbuffer.c:103:20: error: unknown type name 'URLContext' url_evbuffer_write(URLContext h, unsigned char *buf, int size) ^ ffmpeg_url_evbuffer.c:122:1: error: unknown type name 'URLProtocol' URLProtocol evbuffer_protocol = { ^

It appears that URLContext and URLProtocol were made internal in ffmpeg and completely thrown out of libav:

https://github.com/sackmotion/motion/issues/15

Neither struct is to be found anywhere in libav includes.

ejurgensen commented 9 years ago

Yes, I think they have actually been internal for while. The problem here is that ffmpeg_url_evbuffer is even included in the build, because the check in configure.ac should make COND_AVIO=true, which means that avio_evbuffer should get built instead of ffmpeg_url_evbuffer. I don't know why that doesn't work in this case (maybe something with pkg_config?). A quick work-around is to just change src/Makefile.am, so that the right file is built.

I may make that change in master too, I think some of the ffmpeg versions forked-daapd is trying to support are pretty ancient by now.

ejurgensen commented 9 years ago

I've removed support for these old versions of ffmpeg now.