| 1704 | } |
| 1705 | |
| 1706 | static int opencl_frames_init_command_queue(AVHWFramesContext *hwfc) |
| 1707 | { |
| 1708 | OpenCLFramesContext *priv = hwfc->hwctx; |
| 1709 | AVOpenCLFramesContext *hwctx = &priv->p; |
| 1710 | OpenCLDeviceContext *devpriv = hwfc->device_ctx->hwctx; |
| 1711 | cl_int cle; |
| 1712 | |
| 1713 | priv->command_queue = hwctx->command_queue ? hwctx->command_queue |
| 1714 | : devpriv->command_queue; |
| 1715 | cle = clRetainCommandQueue(priv->command_queue); |
| 1716 | if (cle != CL_SUCCESS) { |
| 1717 | av_log(hwfc, AV_LOG_ERROR, "Failed to retain frame " |
| 1718 | "command queue: %d.\n", cle); |
| 1719 | return AVERROR(EIO); |
| 1720 | } |
| 1721 | |
| 1722 | return 0; |
| 1723 | } |
| 1724 | |
| 1725 | static int opencl_frames_init(AVHWFramesContext *hwfc) |
| 1726 | { |
no test coverage detected