[vlc-devel] commit: Fixed avcodec compilation with vaapi enabled. (Laurent Aimar )

git version control git at videolan.org
Tue Dec 8 20:00:24 CET 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Dec  8 19:47:56 2009 +0100| [0786bb1acb0ce2de97da2d9f0042854640fb8e48] | committer: Laurent Aimar 

Fixed avcodec compilation with vaapi enabled.

PIX_FMT_DXVA2_VLD is not yet in official ffmpeg.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0786bb1acb0ce2de97da2d9f0042854640fb8e48
---

 modules/codec/avcodec/video.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index ba58290..7125a6f 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1113,7 +1113,9 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
             [PIX_FMT_VAAPI_IDCT] = "PIX_FMT_VAAPI_IDCT",
             [PIX_FMT_VAAPI_VLD] = "PIX_FMT_VAAPI_VLD",
             [PIX_FMT_VAAPI_MOCO] = "PIX_FMT_VAAPI_MOCO",
+#ifdef HAVE_AVCODEC_DXVA2
             [PIX_FMT_DXVA2_VLD] = "PIX_FMT_DXVA2_VLD",
+#endif
             [PIX_FMT_YUYV422] = "PIX_FMT_YUYV422",
             [PIX_FMT_YUV420P] = "PIX_FMT_YUV420P",
         };
@@ -1131,21 +1133,15 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
             continue;
 #endif
         }
+#ifdef HAVE_AVCODEC_DXVA2
         if( pi_fmt[i] == PIX_FMT_DXVA2_VLD )
         {
-#ifdef HAVE_AVCODEC_DXVA2
             msg_Dbg( p_dec, "Trying DXVA2" );
             p_sys->p_va = vlc_va_NewDxva2( VLC_OBJECT(p_dec), p_sys->i_codec_id );
             if( !p_sys->p_va )
                 msg_Warn( p_dec, "Failed to open DXVA2" );
-#else
-            continue;
-#endif
-        }
-        else
-        {
-            continue;
         }
+#endif
 
         if( p_sys->p_va &&
             p_sys->p_context->width > 0 && p_sys->p_context->height > 0 )




More information about the vlc-devel mailing list