Quoting Rémi Denis-Courmont (2014-12-13 17:42:27)
> ---
>  libavcodec/h264_slice.c     |  6 +++---
>  libavcodec/vdpau.c          | 11 +++++++++++
>  libavcodec/vdpau_h264.c     | 29 ++++++++++++++++++++++++++++-
>  libavcodec/vdpau_internal.h |  3 +++
>  4 files changed, 45 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
> index fe9c0e9..6379d29 100644
> --- a/libavcodec/h264_slice.c
> +++ b/libavcodec/h264_slice.c
> @@ -970,6 +970,9 @@ static enum AVPixelFormat get_pixel_format(H264Context *h)
>              *fmt++ = AV_PIX_FMT_YUV420P10;
>          break;
>      case 8:
> +#if CONFIG_H264_VDPAU_HWACCEL
> +        *fmt++ = AV_PIX_FMT_VDPAU;
> +#endif
>          if (CHROMA444(h)) {
>              if (h->avctx->colorspace == AVCOL_SPC_RGB)
>                  *fmt++ = AV_PIX_FMT_GBRP;
> @@ -993,9 +996,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h)
>              *fmt++ = AV_PIX_FMT_VDA_VLD;
>              *fmt++ = AV_PIX_FMT_VDA;
>  #endif
> -#if CONFIG_H264_VDPAU_HWACCEL
> -            *fmt++ = AV_PIX_FMT_VDPAU;
> -#endif
>              if (h->avctx->codec->pix_fmts)
>                  choices = h->avctx->codec->pix_fmts;
>              else if (h->avctx->color_range == AVCOL_RANGE_JPEG)
> diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
> index 463e600..e22ab1e 100644
> --- a/libavcodec/vdpau.c
> +++ b/libavcodec/vdpau.c
> @@ -70,6 +70,17 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, 
> VdpChromaType *type,
>      VdpChromaType t = VDP_CHROMA_TYPE_420;
>      uint32_t w = avctx->coded_width;
>      uint32_t h = avctx->coded_height;
> +    int val = 0;
> +
> +    switch (avctx->codec_id)
> +    {
> +    case AV_CODEC_ID_H264:
> +        val = ff_vdpau_h264_get_chroma_type(avctx, &t);

This breaks when the h264 decoder is disabled.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to