From 2bbad06bfcb189784e7cc5938cfb3a1c7cd9b0cf Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 26 Jan 2015 13:16:27 -0500 Subject: ta: rename MP_TALLOC_ELEMS to MP_TALLOC_AVAIL The macro actually returns the *available* space in the array, not how much is actually filled in. --- video/filter/vf_vapoursynth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index 61959473a5..afa148fba8 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -266,7 +266,7 @@ static void VS_CC vs_frame_done(void *userData, const VSFrameRef *f, int n, static bool locked_need_input(struct vf_instance *vf) { struct vf_priv_s *p = vf->priv; - return p->num_buffered < MP_TALLOC_ELEMS(p->buffered); + return p->num_buffered < MP_TALLOC_AVAIL(p->buffered); } // Return true if progress was made. @@ -457,7 +457,7 @@ static const VSFrameRef *VS_CC infiltGetFrame(int frameno, int activationReason, p->vsapi->setFilterError(msg, frameCtx); break; } - if (frameno >= p->in_frameno + MP_TALLOC_ELEMS(p->buffered)) { + if (frameno >= p->in_frameno + MP_TALLOC_AVAIL(p->buffered)) { // Too far in the future. Remove frames, so that the main thread can // queue new frames. if (p->num_buffered) { -- cgit v1.2.3