d3d11decoder: Do not print warning message if retry count is in expected range

gst_d3d11_result() will print warning message when HRESULT != S_OK.
However, since the retry is trivial stuff, check hr == E_PENDING first
and do not warn it.
This commit is contained in:
Seungha Yang 2020-02-26 16:13:21 +09:00
parent 418e6991c1
commit 9575d835ba

View file

@ -749,16 +749,15 @@ gst_d3d11_decoder_begin_frame (GstD3D11Decoder * decoder,
priv->decoder, output_view->handle, content_key_size, content_key);
gst_d3d11_device_unlock (priv->device);
if (gst_d3d11_result (hr, priv->device)) {
GST_LOG_OBJECT (decoder, "Success with retry %d", retry_count);
break;
} else if (hr == E_PENDING && retry_count < 50) {
if (hr == E_PENDING && retry_count < 50) {
GST_LOG_OBJECT (decoder, "GPU busy, try again");
/* HACK: no better idea other than sleep...
* 1ms waiting like msdkdec */
g_usleep (1000);
} else {
if (gst_d3d11_result (hr, priv->device))
GST_LOG_OBJECT (decoder, "Success with retry %d", retry_count);
break;
}