mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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:
parent
418e6991c1
commit
9575d835ba
1 changed files with 3 additions and 4 deletions
|
@ -749,16 +749,15 @@ gst_d3d11_decoder_begin_frame (GstD3D11Decoder * decoder,
|
||||||
priv->decoder, output_view->handle, content_key_size, content_key);
|
priv->decoder, output_view->handle, content_key_size, content_key);
|
||||||
gst_d3d11_device_unlock (priv->device);
|
gst_d3d11_device_unlock (priv->device);
|
||||||
|
|
||||||
if (gst_d3d11_result (hr, priv->device)) {
|
if (hr == E_PENDING && retry_count < 50) {
|
||||||
GST_LOG_OBJECT (decoder, "Success with retry %d", retry_count);
|
|
||||||
break;
|
|
||||||
} else if (hr == E_PENDING && retry_count < 50) {
|
|
||||||
GST_LOG_OBJECT (decoder, "GPU busy, try again");
|
GST_LOG_OBJECT (decoder, "GPU busy, try again");
|
||||||
|
|
||||||
/* HACK: no better idea other than sleep...
|
/* HACK: no better idea other than sleep...
|
||||||
* 1ms waiting like msdkdec */
|
* 1ms waiting like msdkdec */
|
||||||
g_usleep (1000);
|
g_usleep (1000);
|
||||||
} else {
|
} else {
|
||||||
|
if (gst_d3d11_result (hr, priv->device))
|
||||||
|
GST_LOG_OBJECT (decoder, "Success with retry %d", retry_count);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue