Do not offer unsupported HWAccel PIX_FMT.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 4 Apr 2011 18:02:42 +0000 (20:02 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Tue, 5 Apr 2011 16:23:15 +0000 (18:23 +0200)
Only fixes MPEG-1/MPEG-2 as a first step.

libavcodec/mpeg12.c

index 4a17299..9afe8c3 100644 (file)
@@ -1217,21 +1217,31 @@ static void quant_matrix_rebuild(uint16_t *matrix, const uint8_t *old_perm,
 }
 
 static const enum PixelFormat mpeg1_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_MPEG_XVMC_DECODER
     PIX_FMT_XVMC_MPEG2_IDCT,
     PIX_FMT_XVMC_MPEG2_MC,
+#endif
+#if CONFIG_MPEG1_VDPAU_HWACCEL
     PIX_FMT_VDPAU_MPEG1,
-    PIX_FMT_DXVA2_VLD,
-    PIX_FMT_VAAPI_VLD,
+#endif
     PIX_FMT_YUV420P,
     PIX_FMT_NONE
 };
 
 static const enum PixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_MPEG_XVMC_DECODER
     PIX_FMT_XVMC_MPEG2_IDCT,
     PIX_FMT_XVMC_MPEG2_MC,
+#endif
+#if CONFIG_MPEG2_VDPAU_HWACCEL
     PIX_FMT_VDPAU_MPEG2,
+#endif
+#if CONFIG_MPEG2_DXVA2_HWACCEL
     PIX_FMT_DXVA2_VLD,
+#endif
+#if CONFIG_MPEG2_VAAPI_HWACCEL
     PIX_FMT_VAAPI_VLD,
+#endif
     PIX_FMT_YUV420P,
     PIX_FMT_NONE
 };