[vlc-commits] avcodec: vdpau: do not attempt to decode if we don't have enough surfaces
Steve Lhomme
git at videolan.org
Mon Nov 4 12:15:06 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 22 08:01:13 2019 +0200| [011a60e16f612621ea16eb142a2e0f663c504cfc] | committer: Steve Lhomme
avcodec: vdpau: do not attempt to decode if we don't have enough surfaces
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=011a60e16f612621ea16eb142a2e0f663c504cfc
---
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 50527e435a..74aa135f70 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -253,7 +253,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const AVPixFmtDescriptor *d
}
vctx_priv->pool[i] = NULL;
- if (i < codec_refs + 3u)
+ if (i < refs)
{
msg_Err(va, "not enough video RAM");
while (i > 0)
@@ -261,10 +261,6 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const AVPixFmtDescriptor *d
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(vctx_priv->vdp, &infos) == VDP_STATUS_OK)
msg_Info(va, "Using %s", infos);
More information about the vlc-commits
mailing list