Fix resize to work also in stereo

Before it throwed an out of bounds exception when procession stereo input stream.