gewalker/plex-linux — Issue #5: compile fails with libvdpau enabled
Author: RustyDust
Created: 2011-12-05 13:25:21+00:00
State: open

To reproduce: install libvdpau-dev, configure, make.

Result:
```DVDVideoCodecFFmpeg.cpp: In member function ‘virtual bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo&, CDVDCodecOptions&)’:
DVDVideoCodecFFmpeg.cpp:184:60: error: ‘CODEC_ID_XVID’ was not declared in this scope
make[1]: *** [DVDVideoCodecFFmpeg.o] Error 1
make[1]: Leaving directory `/home/stefan/Projects/Plex/plex-linux/xbmc/cores/dvdplayer/DVDCodecs/Video'
make: *** [xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a] Error 2```

According to this: http://ffmpeg.org/pipermail/ffmpeg-devel/2010-March/093832.html
the offending part in DVDVideoCodecFFmpeg.cpp can be safely removed. Patch:

```--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -181,7 +181,7 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options
if(pCodec->id == hints.codec
&& pCodec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
{
- if ((pCodec->id == CODEC_ID_MPEG4 || pCodec->id == CODEC_ID_XVID) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
+ if ((pCodec->id == CODEC_ID_MPEG4) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
continue;

CLog::Log(LOGNOTICE,"CDVDVideoCodecFFmpeg::Open() Creating VDPAU(%ix%i, %d)",hints.width, hints.height, hints.codec);```