ffmpeg and libav compatibility fixes #2597

Merged
merged 7 commits into from Apr 14, 2013

Conversation

Projects
None yet
7 participants
Contributor

Alphix commented Apr 11, 2013

Fix an issue with embedded mkv subtitles after the recent ffmpeg merge. Also go through all version checks and remove/update/comment them (should help libav and ffmpeg compatibility).

This is an updated version of this PR (#2525)

rbej commented Apr 12, 2013

Compile error on Rpi.

When i compile only "ffmpeg compatibility fix for matroska embedded subtitles" patch everything is ok. No compile errors. But when compile all 7 patches i have error.

Member

popcornmix commented Apr 12, 2013

@rbej it's more useful with the error message:

In file included from DVDCodecs/Video/DVDVideoCodecFFmpeg.h:29:0,
                 from DVDFileInfo.cpp:46:
/home/pi/pop/xbmc/lib/DllAvFilter.h:85:92: error: macro "AV_VERSION_INT" requires 3 arguments, but only 1 given
/home/pi/pop/xbmc/lib/DllAvFilter.h:189:92: error: macro "AV_VERSION_INT" requires 3 arguments, but only 1 given
make[1]: *** [DVDFileInfo.o] Error 1

The reason for the error appears to be:
(defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3.43.100)

which should look like:
(defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100)

Member

elupus commented Apr 13, 2013

Above comments need correction.

Contributor

Alphix commented Apr 13, 2013

@elupus Done. Compile tested on linux (with --disable-dvdcss --disable-rsxs because either of those seem to break the compilation)

rbej commented Apr 14, 2013

Now compile is ok on Rpi, but patch dont work.

Contributor

aballier commented Apr 14, 2013

I'd merge the last patch with the wrong one, it's a bad idea to have non compilable revisions in between.

Owner

MartijnKaijser commented Apr 14, 2013

Patches themselves need to be fixed instead of adding a patch to fix them

Contributor

Alphix commented Apr 14, 2013

@rbej patch don't work? As in....mkv embedded subtitles are now shown during playback?

Alphix added some commits Apr 1, 2013

ffmpeg compatibility fix for matroska embedded subtitles
Commit 2626cc4580bfd560c6983338d77b2c11c16af94f in the ffmpeg repo
changed the codec id of matroska embedded S_TEXT/UTF-8 subtitles
from CODEC_ID_TEXT to AV_CODEC_ID_SUBRIP. That commit is part of
ffmpeg 1.0 and later.

Add the new codec id to provide compatibility for the updated
ffmpeg library and external ffmpeg libraries.
Remove obsolete ffmpeg version check (52,0,0)
This test (which presumably checks for LIBAVCODEC_VERSION_MAJOR >= 52)
seems both obsolete and incorrect. The major version is shifted 16 bits,
not 12. Major version 52 was introduced in commit
dd1c8f3e6e5380f993c86750bb09fd42e130143f (from Sept 8, 2008) so this check
is anyhow obsolete.
Remove obsolete libavformat version check (52,14,0)
This version of libavformat is from May 22, 2008
(commit 79d7836a5e213d547629555e3f1157e7197aef68).

The first release to include it was ffmpeg 0.5 (3 March 2009).
Remove obsolete libavcodec version check (52,38,1)
This version of libavcodec is from Nov 10, 2008
(commit 3155716677eac826b998b487db66927796f6a833).

The first release to include it was ffmpeg 0.6 (15 June 2010).
Remove obsolete libavformat version check (52,83,0)
This version of libavformat is from Oct 15, 2010
(commit 03700d399bcc749ad7916f2d39a99527f37c8b6e).

The first release to include it was ffmpeg 0.7.1 (24 June 2011).
Update libavcodec version check
Make the version check compatible with both ffmpeg and libav.
Also add comments describing when the API change was made for
both libraries.
Update libavfilter version check
Make the version check compatible with both ffmpeg and libav.
Also add comments describing when the API change was made for
both libraries.
Contributor

Alphix commented Apr 14, 2013

@rbej, the patch should work now (missing include)

The rest of you - I managed to find out how to change existing patches in a github PR (git push --force, which is usually strongly discouraged in other contexts)...so here's a new set of patches with the fixups merged into the proper commits

Compile tested and I've also verified that mkv subtitles work

rbej commented Apr 14, 2013

Subs is back. Thanks.

elupus added a commit that referenced this pull request Apr 14, 2013

Merge pull request #2597 from Alphix/ffmpeg-libav-fixes
ffmpeg and libav compatibility fixes

@elupus elupus merged commit 95e2d6d into xbmc:master Apr 14, 2013

@Alphix Alphix deleted the Alphix:ffmpeg-libav-fixes branch Apr 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment