OSDN Git Service

qsv_api: fix building with libmfx disabled
authorAnton Khirnov <anton@khirnov.net>
Thu, 19 Feb 2015 16:35:34 +0000 (17:35 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 19 Feb 2015 16:35:34 +0000 (17:35 +0100)
libavcodec/qsv_api.c

index 8fde494..234b596 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
+
+#include <stddef.h>
+
 #include "libavutil/mem.h"
 
+#if CONFIG_QSV
 #include "qsv.h"
 
 AVQSVContext *av_qsv_alloc_context(void)
 {
     return av_mallocz(sizeof(AVQSVContext));
 }
+#else
+
+struct AVQSVContext *av_qsv_alloc_context(void);
+
+struct AVQSVContext *av_qsv_alloc_context(void)
+{
+    return NULL;
+}
+#endif