From 8d061989dd0397da15aa29f52d243fe125bf2f5e Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 18 Feb 2013 08:15:52 -0800 Subject: lavc: Split out ff_hwaccel_pixfmt_list_420[] over individual codecs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not all hwaccels implement all codecs, so using one single list for multiple such codecs means some codecs will be represented in the list, even though they don't actually handle that codec. Copying specific lists in each codec fixes that. Signed-off-by: Martin Storsjö --- libavcodec/h263dec.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libavcodec/h263dec.c') diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 663fe90244..9714632006 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -738,6 +738,17 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); return (ret && (avctx->err_recognition & AV_EF_EXPLODE))?ret:get_consumed_bytes(s, buf_size); } +const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = { +#if CONFIG_VAAPI + AV_PIX_FMT_VAAPI_VLD, +#endif +#if CONFIG_VDPAU + AV_PIX_FMT_VDPAU, +#endif + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_NONE +}; + AVCodec ff_h263_decoder = { .name = "h263", .type = AVMEDIA_TYPE_VIDEO, @@ -750,5 +761,5 @@ AVCodec ff_h263_decoder = { CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, .flush = ff_mpeg_flush, .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), - .pix_fmts = ff_hwaccel_pixfmt_list_420, + .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, }; -- cgit v1.2.3