Up ?
This patch and 4/4 have not been rejected. I would rather not have to
update them again and wait even longer if something else is changes in
libavcodec that changes the version number.

On Wed, Jan 4, 2017 at 1:44 PM, Steve Lhomme <[email protected]> wrote:
> No need to loop through the known surfaces, we'll use the requested surface
> anyway.
>
> The loop is only done for DXVA2.
> ---
>  libavcodec/dxva2.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c
> index 6fc4f97..b0452b6 100644
> --- a/libavcodec/dxva2.c
> +++ b/libavcodec/dxva2.c
> @@ -41,19 +41,19 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext 
> *avctx,
>      void *surface = get_surface(frame);
>      unsigned i;
>
> -    for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {
>  #if CONFIG_D3D11VA
> -        if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && 
> ctx->d3d11va.surface[i] == surface) {
> -            D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;
> -            ID3D11VideoDecoderOutputView_GetDesc(ctx->d3d11va.surface[i], 
> &viewDesc);
> -            return viewDesc.Texture2D.ArraySlice;
> -        }
> +    if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) {
> +        D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;
> +        ID3D11VideoDecoderOutputView_GetDesc((ID3D11VideoDecoderOutputView*) 
> surface, &viewDesc);
> +        return viewDesc.Texture2D.ArraySlice;
> +    }
>  #endif
>  #if CONFIG_DXVA2
> +    for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {
>          if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD && ctx->dxva2.surface[i] 
> == surface)
>              return i;
> -#endif
>      }
> +#endif
>
>      assert(0);
>      return 0;
> --
> 2.10.1.windows.1
>
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to