huffyuv: Return proper error codes