swscale: fix ring buffer size when scaling slices of a frame