]> git.sesse.net Git - vlc/commitdiff
Compilation fix for old ffmpeg version.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 1 Jun 2009 17:22:37 +0000 (19:22 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 1 Jun 2009 17:23:11 +0000 (19:23 +0200)
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/video.c

index 5b2d995585084527bf1d37c8aa4e54a66a3389d3..a9d4c6faa0935a985f6d43276d8c6f6018bbe242 100644 (file)
@@ -31,7 +31,9 @@
 
 #ifdef HAVE_LIBAVCODEC_AVCODEC_H
 #   include <libavcodec/avcodec.h>
-#   include <libavcodec/vaapi.h>
+#   ifdef HAVE_AVCODEC_VAAPI
+#       include <libavcodec/vaapi.h>
+#   endif
 #elif defined(HAVE_FFMPEG_AVCODEC_H)
 #   include <ffmpeg/avcodec.h>
 #else
index 879f99518b0f8ea7242fc2839ef4e7dbb5a7bb54..0c2fab92a0ced6596c55077561c64fc4b96d3ee9 100644 (file)
@@ -933,6 +933,8 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
 
     if( p_sys->p_va )
     {
+#ifdef HAVE_AVCODEC_VAAPI
+        /* hwaccel_context is not present in old fffmpeg version */
         if( VaSetup( p_sys->p_va,
                      &p_sys->p_context->hwaccel_context, &p_dec->fmt_out.video.i_chroma,
                      p_sys->p_context->width, p_sys->p_context->height ) )
@@ -940,6 +942,9 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
             msg_Err( p_dec, "VaSetup failed" );
             return -1;
         }
+#else
+        assert(0);
+#endif
 
         /* */
         p_ff_pic->type = FF_BUFFER_TYPE_USER;