gewalker/plex-linux — Issue #6: VDPAU.cpp uses deprecated ffmpeg struct (patch enclosed)
Author: RustyDust
Created: 2011-12-05 13:38:34+00:00
State: open

Error on compilation with libvdpau-dev present:

```bash
VDPAU.cpp: In member function ‘virtual void CVDPAU::Close()’:
VDPAU.cpp:222:18: warning: converting to non-pointer type ‘GLXPixmap {aka long unsigned int}’ from NULL [-Wconversion-null]
VDPAU.cpp:228:16: warning: converting to non-pointer type ‘Pixmap {aka long unsigned int}’ from NULL [-Wconversion-null]
VDPAU.cpp: In member function ‘virtual int CVDPAU::Decode(AVCodecContext*, AVFrame*)’:
VDPAU.cpp:1167:17: error: ‘AVCodecContext’ has no member named ‘hurry_up’
VDPAU.cpp:1187:15: error: ‘AVCodecContext’ has no member named ‘hurry_up’
make[1]: *** [VDPAU.o] Error 1
```

According to this: http://forum.xbmc.org/showthread.php?t=100601&page=4 and that: https://github.com/xbmc/xbmc/pull/204 references to avctx->hurry_up have to be replaced.
Patch against laika:

```diff

--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@@ -1164,7 +1164,7 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame)
{
if(method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF
|| method == VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF
- || avctx->hurry_up)
+ || avctx->skip_frame == AVDISCARD_NONREF)
m_mixerstep = 0;
else
m_mixerstep = 1;
@@ -1184,7 +1184,7 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame)
else if(m_mixerstep == 1)
{ // no new frame given, output second field of old frame

- if(avctx->hurry_up)
+ if(avctx->skip_frame == AVDISCARD_NONREF)
{
ClearUsedForRender(&past[1]);
return VC_BUFFER;
```