xl: Make sure the width is valid

And undo the wrong commit f1cb490d6d7391ff7e28cc376908cc98a652228d

CC: libav-stable@libav.org