sanm: reset frame sizes on buffer destruction

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
sanm: init sizes with the full frame size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
sanm: Use the correct height variable in the decoded_size checks

Fixes integer overflow and out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>