[vlc-commits] va: compute the retries as the upper amount needed for a second
Steve Lhomme
git at videolan.org
Thu Sep 20 17:02:12 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 20 16:55:24 2018 +0200| [f663d57e1bf81a861f6e37eb337cd872b0312d4e] | committer: Steve Lhomme
va: compute the retries as the upper amount needed for a second
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f663d57e1bf81a861f6e37eb337cd872b0312d4e
---
modules/codec/avcodec/va_surface.c | 2 +-
modules/hw/vdpau/avcodec.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index 67b3fbe7b2..eb09413dc8 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -161,7 +161,7 @@ static picture_context_t *GetSurface(va_pool_t *va_pool)
int va_pool_Get(va_pool_t *va_pool, picture_t *pic)
{
- unsigned tries = (CLOCK_FREQ + VOUT_OUTMEM_SLEEP) / VOUT_OUTMEM_SLEEP;
+ unsigned tries = (VLC_TICK_FROM_SEC(1) + VOUT_OUTMEM_SLEEP) / VOUT_OUTMEM_SLEEP;
picture_context_t *field;
if (va_pool->surface_count == 0)
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index ecaa18c2aa..e4544e6e0c 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -92,7 +92,7 @@ static vlc_vdp_video_field_t *GetSurface(vlc_va_t *va)
static int Lock(vlc_va_t *va, picture_t *pic, uint8_t **data)
{
vlc_vdp_video_field_t *field;
- unsigned tries = (CLOCK_FREQ + VOUT_OUTMEM_SLEEP) / VOUT_OUTMEM_SLEEP;
+ unsigned tries = (VLC_TICK_FROM_SEC(1) + VOUT_OUTMEM_SLEEP) / VOUT_OUTMEM_SLEEP;
while ((field = GetSurface(va)) == NULL)
{
More information about the vlc-commits
mailing list