[vlc-devel] [PATCH 2/2] vdpau: do not attempt to decode if we don't have enough surfaces
Steve Lhomme
robux4 at ycbcr.xyz
Tue Oct 22 09:39:17 CEST 2019
We try to get the minimum amount that is guaranteed to work. We don't want to
fail in the middle of playback because we actually did not have enough surfaces.
---
modules/hw/vdpau/avcodec.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 537f8f86d7c..3f9b46d8fba 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -220,7 +220,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const AVPixFmtDescriptor *d
}
sys->pool[i] = NULL;
- if (i < codec_refs + 3u)
+ if (i < refs)
{
msg_Err(va, "not enough video RAM");
while (i > 0)
@@ -232,10 +232,6 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const AVPixFmtDescriptor *d
if (sys->vctx == NULL)
goto error;
- if (i < refs)
- msg_Warn(va, "video RAM low (allocated %u of %u buffers)",
- i, refs);
-
const char *infos;
if (vdp_get_information_string(sys->vdp, &infos) == VDP_STATUS_OK)
msg_Info(va, "Using %s", infos);
--
2.17.1
More information about the vlc-devel
mailing list