swscale: fix ticket #4881