Ticket #10759: d3d12va_vc1.diff

File d3d12va_vc1.diff, 825 bytes (added by Aleksoid1978, 3 years ago)
  • libavcodec/d3d12va_vc1.c

    diff --git a/libavcodec/d3d12va_vc1.c b/libavcodec/d3d12va_vc1.c
    index 3d15abd1f1..c0ea6c4b2a 100644
    a b static int d3d12va_vc1_end_frame(AVCodecContext *avctx)  
    171171
    172172static int d3d12va_vc1_decode_init(AVCodecContext *avctx)
    173173{
     174    int ret;
    174175    D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
    175     ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VC1;
     176    ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VC1_D2010;
    176177
    177178    ctx->max_num_ref = 3;
    178179
    179     return ff_d3d12va_decode_init(avctx);
     180    ret = ff_d3d12va_decode_init(avctx);
     181    if (ret < 0) {
     182        ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VC1;
     183        ret = ff_d3d12va_decode_init(avctx);
     184    }
     185
     186    return ret;
    180187}
    181188
    182189#if CONFIG_WMV3_D3D12VA_HWACCEL