From 69645c021ad2cc503769b44b9008f98b014423de Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 26 May 2011 09:15:38 -0400 Subject: swscale: replace formatConvBuffer[VOF] by allocated array. This allows to convert between formats of arbitrary width, regardless of the value of VOF/VOFW. --- libswscale/swscale_template.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libswscale/swscale_template.c') diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index aeeb42815e..8784359dc2 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -459,9 +459,10 @@ inline static void hcscale_c(SwsContext *c, uint16_t *dst, long dstWidth, src2 += c->chrSrcOffset; if (c->chrToYV12) { - c->chrToYV12(formatConvBuffer, formatConvBuffer+VOFW, src1, src2, srcW, pal); + uint8_t *buf2 = formatConvBuffer + FFALIGN(srcW, 16); + c->chrToYV12(formatConvBuffer, buf2, src1, src2, srcW, pal); src1= formatConvBuffer; - src2= formatConvBuffer+VOFW; + src2= buf2; } if (!c->hcscale_fast) { -- cgit v1.2.3