vlc | branch: master | Steve Lhomme <[email protected]> | 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);

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to