From a05aa821b67d48a008e0f470fd2f9656603d40f5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 24 Feb 2009 19:04:43 +0000 Subject: add ff_find_hwaccel() by Gwenole Beauchesne Originally committed as revision 17569 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpeg12.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/mpeg12.c') diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 10e4632d9d..d958ae52f3 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1302,6 +1302,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx){ }//MPEG-2 avctx->pix_fmt = mpeg_get_pixelformat(avctx); + avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); //until then pix_fmt may be changed right after codec init if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || @@ -2071,6 +2072,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) s->low_delay= 1; avctx->pix_fmt = mpeg_get_pixelformat(avctx); + avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); if( avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ) -- cgit v1.2.3