On Fri, Jun 09, 2017 at 04:27:35PM +0200, wm4 wrote:
> The cast in get_surface() is silly, but unless we change the av_log
> function signature, or all callers of ff_dxva2_get_surface_index(), it's
> needed to remove the const warning.
Constifying av_log() seems like the correct solution.
> --- a/libavcodec/dxva2.c
> +++ b/libavcodec/dxva2.c
> @@ -623,7 +622,6 @@ int ff_dxva2_decode_init(AVCodecContext *avctx)
> if (sctx->pix_fmt == AV_PIX_FMT_D3D11) {
> AVD3D11VADeviceContext *device_hwctx = frames_ctx->device_ctx->hwctx;
> AVD3D11VAContext *d3d11_ctx = &sctx->ctx.d3d11va;
> - HRESULT hr;
>
> @@ -759,7 +757,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
> #endif
> if (FAILED(hr)) {
> av_log(avctx, AV_LOG_ERROR, "Failed to get a buffer for %u: 0x%x\n",
> - type, hr);
> + type, (unsigned)hr);
This looks shady. What is the right length modifier for HRESULT? l?
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel