diff h264.c @ 10512:6ec7b5450ca7 libavcodec

Add .pix_fmts to H264 VDPAU decoder declaration and remove obsolete test for codec->capabilities.
author cehoyos
date Tue, 10 Nov 2009 20:55:00 +0000
parents bfea93e47391
children 3d08b72377ee
line wrap: on
line diff
--- a/h264.c	Tue Nov 10 20:24:41 2009 +0000
+++ b/h264.c	Tue Nov 10 20:55:00 2009 +0000
@@ -2196,9 +2196,6 @@
     if(!avctx->has_b_frames)
     s->low_delay= 1;
 
-    if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
-        avctx->pix_fmt= PIX_FMT_VDPAU_H264;
-    else
         avctx->pix_fmt= avctx->get_format(avctx, avctx->codec->pix_fmts);
     avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);
     avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
@@ -8191,6 +8188,7 @@
     CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
     .flush= flush_dpb,
     .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"),
+    .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE},
 };
 #endif