]> git.sesse.net Git - vlc/commitdiff
vdpau/avcodec: fix build for older ffmpeg
authorTristan Matthews <le.businessman@gmail.com>
Wed, 5 Feb 2014 21:51:28 +0000 (16:51 -0500)
committerTristan Matthews <le.businessman@gmail.com>
Wed, 5 Feb 2014 22:22:44 +0000 (17:22 -0500)
modules/hw/vdpau/avcodec.c

index 7081deeaaace1b58fea339bdafba1b1dfe090067..a6eab23701b70f57c0c7f571c611692d1e7840b6 100644 (file)
@@ -37,6 +37,7 @@
 #include <vlc_xlib.h>
 #include "vlc_vdpau.h"
 #include "../../codec/avcodec/va.h"
+#include "../../codec/avcodec/avcommon_compat.h"
 
 static int Open(vlc_va_t *, int, const es_format_t *);
 static void Close(vlc_va_t *);
@@ -279,7 +280,7 @@ static int Open(vlc_va_t *va, int codec, const es_format_t *fmt)
     if (unlikely(sys == NULL))
        return VLC_ENOMEM;
 
-#if (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 26, 0))
+#if LIBAVCODEC_VERSION_CHECK(55, 26, 0, 42, 100)
     sys->context = av_vdpau_alloc_context();
 #else
     sys->context = calloc(1, sizeof (*sys->context));