vaapi: allow build against older VA-API 0.31.
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Wed, 30 Mar 2011 07:29:34 +0000 (09:29 +0200)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Wed, 30 Mar 2011 14:15:29 +0000 (16:15 +0200)
configure
libavcodec/vaapi_vc1.c

index 9cf64d2..40d5aba 100755 (executable)
--- a/configure
+++ b/configure
@@ -2948,8 +2948,7 @@ check_func XFixesGetCursorImage -lX11 -lXext -lXfixes
 if ! disabled vaapi; then
     check_lib va/va.h vaInitialize -lva && {
         check_cpp_condition va/va_version.h "VA_CHECK_VERSION(0,32,0)" ||
-        { echolog "Please upgrade to VA-API >= 0.32 if you would like VA-API support." &&
-          disable vaapi; }
+        warn "Please upgrade to VA-API >= 0.32 if you would like full VA-API support.";
     } || disable vaapi
 fi
 
index 02186c3..b1dfde8 100644 (file)
@@ -160,7 +160,9 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
     pic_param->sequence_fields.bits.syncmarker                      = s->resync_marker;
     pic_param->sequence_fields.bits.rangered                        = v->rangered;
     pic_param->sequence_fields.bits.max_b_frames                    = s->avctx->max_b_frames;
+#if VA_CHECK_VERSION(0,32,0)
     pic_param->sequence_fields.bits.profile                         = v->profile;
+#endif
     pic_param->coded_width                                          = s->avctx->coded_width;
     pic_param->coded_height                                         = s->avctx->coded_height;
     pic_param->entrypoint_fields.value                              = 0; /* reset all bits */